Curl error 28 operation timed out after 2001 milliseconds with 0 bytes received

Как исправить ошибку cURL 28: время ожидания соединения истекло Приветствуем вас! Вы видите ошибку cURL 28: Превышено время ожидания соединения на вашем сайте WordPress? Ошибка cURL 28 — распространенная проблема WordPress REST API, которая может повлиять на производительность вашего веб-сайта и привести к его непредсказуемому поведению. В этой статье мы покажем вам, как легко […]

Содержание

  1. Как исправить ошибку cURL 28: время ожидания соединения истекло
  2. How to fix cURL error 28: Connection timed out after X milliseconds
  3. What is cURL in WordPress?
  4. What Causes cURL error 28 in WordPress?
  5. 1. Temporarily Disable WordPress Firewall
  6. 2. Deactivate All WordPress Plugins
  7. 3. Ensure Your Hosting Server is Using the Latest Software
  8. 4. Fix SSL Insecure Content Issues
  9. 5. Seek Help from Hosting Provider
  10. Curl error: 28 (OPERATION_TIMEOUTED) Fixed!
  11. Background of “Curl error: 28”
  12. Reasons for Curl error: 28 (OPERATION_TIMEOUTED)
  13. 1. Network/Firewall settings
  14. 2. DNS resolution failures
  15. 3. Server limits
  16. 4. Security modules
  17. How we fix Curl error: 28
  18. Conclusion
  19. PREVENT YOUR SERVER FROM CRASHING!

Как исправить ошибку cURL 28: время ожидания соединения истекло

Приветствуем вас! Вы видите ошибку cURL 28: Превышено время ожидания соединения на вашем сайте WordPress? Ошибка cURL 28 — распространенная проблема WordPress REST API, которая может повлиять на производительность вашего веб-сайта и привести к его непредсказуемому поведению.

В этой статье мы покажем вам, как легко исправить проблему cURL error 28 на вашем веб-сайте WordPress.

Что такое cURL в WordPress?

CURL — это программная утилита, используемая WordPress и многими другими веб-приложениями для отправки и получения запросов данных с использованием URL-адресов.

WordPress использует cURL для обработки нескольких запросов API. Он доступен как расширение языка программирования PHP, и ваша хостинговая компания WordPress позаботится об этом.

Библиотека cURL играет решающую роль в том, как WordPress работает за кулисами. Если он не настроен должным образом, ваш веб-сайт не будет работать должным образом.

Что вызывает ошибку cURL 28 в WordPress?

Неспособность своевременно ответить на запросы данных сервера вызывает ошибку 28 cURL в WordPress.

WordPress использует REST API (метод программирования) для отправки и получения запросов данных. Если время ожидания этих запросов истекло, вы увидите это как критическую проблему в отчете о работоспособности сайта с заголовком «Ошибка REST API» .

Расширение ошибки покажет вам дополнительную информацию, включая сообщение об ошибке:

Error: cURL error 28: Operation timed out after x milliseconds with x bytes received (http_request_failed)

Вы также можете увидеть другую связанную проблему с заголовком «Ваш сайт не может выполнить запрос обратной связи» . В нем будет аналогичное сообщение об ошибке со следующим описанием.

«Запрос обратной связи к вашему сайту не удался, это означает, что функции, использующие их, в настоящее время не работают должным образом».

Что может вызвать тайм-аут cURL?

Ряд сценариев может вызвать тайм-аут cURL в WordPress:

  • Например, плагин брандмауэра WordPress может блокировать запрос REST API, считая его подозрительным действием.
  • Если ваш DNS-сервер работает некорректно, это также может вызвать сбой HTTP-запросов и вызвать ошибку тайм-аута cURL в WordPress.
  • Плохо настроенный хостинг-сервер может просто иметь очень низкий порог тайм-аута, что может помешать правильной работе определенных процессов WordPress.

Давайте посмотрим, как устранить и исправить данную проблему.

1. Временно отключите брандмауэр WordPress

Если вы используете брандмауэр WordPress или плагин безопасности, временно отключите его.

После этого вам нужно посетить страницу отчета о работоспособности сайта WordPress, чтобы узнать, решена ли ваша проблема.

Если да, то вам нужно проверить журналы брандмауэра WordPress, чтобы узнать, какие запросы API были заблокированы. Это либо определит источник проблемы, либо вы можете настроить параметры брандмауэра, чтобы не блокировать законные запросы API.

2. Отключите все плагины WordPress

Плагины WordPress создают собственные запросы API для отправки и получения данных. Если эти вызовы слишком часты или для выполнения требуется слишком много времени, это может вызвать ошибку cURL в отчете о работоспособности вашего сайта.

Самый простой способ выяснить это — отключить все плагины WordPress. Просто перейдите на страницу «Плагины»-«Установленные» и выберите все плагины.

После этого щелкните раскрывающееся меню «Массовые действия» , чтобы выбрать «Деактивировать» , а затем нажмите кнопку «Применить» .

Теперь вы можете посетить отчет о работоспособности сайта, чтобы узнать, исчезла ли проблема. Если это устранило проблему, вы можете активировать свои плагины один за другим, пока проблема не появится снова.

Это поможет вам найти плагин, который может вызывать проблему.

3. Убедитесь, что ваш хостинг-сервер использует новейшее программное обеспечение

Следующий шаг — убедиться, что ваш хостинг-сервер WordPress использует последние версии PHP, библиотеки cURL и OpenSSL.

Вы можете проверить это, просмотрев вкладку системной информации на странице «Инструменты»-«Здоровье сайта» .

Просто перейдите на вкладку «Информация» и разверните раздел «Сервер» . Отсюда вы можете получить информацию о программном обеспечении, установленном на вашем хостинг-сервере WordPress.

В идеале ваш сервер должен использовать PHP 7.4.13 или выше, curl 7.74.0 или выше и OpenSSL 1.1.1 или выше.

Если это не так, вам необходимо связаться с вашей хостинговой компанией и попросить их обновить программное обеспечение для вашей учетной записи хостинга.

4. Устранение проблем с небезопасным контентом SSL

Если ваш сайт использует HTTPS / SSL, но он не настроен должным образом, это также может привести к тому, что ваш веб-сервер заблокирует небезопасные запросы cURL.

Точно так же, если ваш веб-сайт не использует HTTPS / SSL, но он сделал вызов API с использованием URL-адреса HTTP, то эти запросы тоже не будут выполнены, и вместо этого вы можете увидеть следующую ошибку cURL:

Ошибка: ошибка cURL 7: не удалось подключиться к порту localhost 443: в соединении отказано (http_request_failed)

Чтобы исправить это, вы можете попросить своего хостинг-провайдера переустановить сертификат SSL для вашего сайта.

5. Обратитесь за помощью к поставщику услуг хостинга

Если описанные выше действия не помогли устранить ошибку cURL 28 то, проблема, скорее всего, связана с средой хостинга.

Есть много факторов, которые могут контролироваться и исправляться только вашей хостинговой компанией. Например, если их DNS-серверы не могут своевременно разрешать запросы, это приведет к тайм-ауту запросов cURL.

Другой сценарий может заключаться в более медленном подключении или сетевых проблемах с вашим хост-сервером.

Просто отправьте им запрос в службу поддержки с подробными сведениями об ошибке, и их технический персонал сможет устранить неполадки и применить исправление для ее решения. Ну что, у нас на этом все. Всем пока!

Источник

How to fix cURL error 28: Connection timed out after X milliseconds

Last updated on January 5th, 2021 by Editorial Staff | Reader Disclosure Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

Are you seeing the cURL error 28: Connection timed out error on your WordPress site?

The cURL error 28 is a common WordPress REST API issue that can affect your website’s performance and may cause it to behave unpredictably.

In this article, we will show you how to easily fix the ‘cURL error 28: Connection timed out’ issue on your WordPress website.

What is cURL in WordPress?

The cURL is a software utility used by WordPress and many other web applications to send and receive data requests using URLs.

WordPress uses cURL to handle several API requests. It is available as an extension of the PHP programming language, and your WordPress hosting company takes care of that.

The cURL library plays a crucial role in how WordPress works behind the scenes. If it is not configured properly, then your WordPress website will not function properly.

What Causes cURL error 28 in WordPress?

Failure to respond back to the server’s data requests in a timely manner causes cURL error 28 in WordPress.

WordPress uses REST API (a programming technique) to send and receive data requests. If these requests time out, then you’ll see it as a critical issue in the Site Health report with the title ‘The REST API encountered in error’.

Expanding the error will show you further details including the error message:

Error: cURL error 28: Operation timed out after x milliseconds with x bytes received (http_request_failed)

You may also see another related issue with the title ‘Your site could not complete a loopback request’. It will have a similar error message with the following description.

‘The loopback request to your site failed, this means features relying on them are not currently working as expected.’

What may cause cURL to timeout?

A number of scenarios may cause the cURL to time out in WordPress.

For instance, a WordPress firewall plugin may block a REST API request considering it to be a suspicious activity.

If your DNS server is not working correctly, then this may also fail HTTP requests and cause the cURL timeout error in WordPress.

A poorly configured WordPress hosting server may simply have a very low timeout threshold which may stop certain WordPress processes to run properly.

That being said, let’s take a look at how to troubleshoot and fix the ‘curl error 28: Connection timed out’ issue in WordPress.

1. Temporarily Disable WordPress Firewall

If you are using a WordPress firewall or a security plugin, then go ahead and temporarily deactivate it.

After that, you need to visit the WordPress site health report page to see if your issue has resolved.

If it has, then you need to check your WordPress firewall logs to see which API requests have been blocked.

This would either identify the source of the issue or you can adjust firewall settings to not block legitimate API requests.

2. Deactivate All WordPress Plugins

WordPress plugins make their own API requests to send and receive data. If these calls are too frequent or take too long to complete, then this may cause the cURL error in your site health report.

The easiest way to figure this out is by deactivating all WordPress plugins. Simply go to the Plugins » Installed Plugins page and select all plugins.

After that, click on the Bulk Actions drop down to select ‘Deactivate’ and then click on the ‘Apply’ button.

You can now visit the Site Health report to see if the issue has disappeared. If this resolved the issue, then you can start activating your plugins one by one until the issue reappears.

This will help you find the plugin that may be causing the issue and you can then ask the plugin author for support.

3. Ensure Your Hosting Server is Using the Latest Software

The next, step is to make sure that your WordPress hosting server is using the latest versions of PHP, cURL library, and OpenSSL.

You can check that by looking at the system information tab under Tools » Site Health page.

Simply switch to the ‘Info’ tab and expand the ‘Server’ section. From here you can get the information about software installed on your WordPress hosting server.

Ideally, your server should be using PHP 7.4.13 or higher, curl 7.74.0 or higher, and OpenSSL 1.1.1 or higher.

If it doesn’t, then you need to contact your WordPress hosting company and request them to update the software for your hosting account.

4. Fix SSL Insecure Content Issues

If your WordPress site is using HTTPS / SSL, but it is not configured properly, then this could also lead your web server to block insecure cURL requests.

Similarly, if your WordPress site doesn’t use HTTPS / SSL, but it made an API call using an HTTPs URL, then those requests will fail too, and you may see the following cURL error instead:

‘Error: cURL error 7: Failed to connect to localhost port 443: Connection refused (http_request_failed)

To fix this, you can ask your hosting provider to re-install SSL certificate for your website. If the issue persists, then follow our guide on how to fix common SSL issues to properly set up SSL on your WordPress website.

5. Seek Help from Hosting Provider

If the above steps fail to resolve the cURL error 28 on your WordPress site, then the problem is most likely a hosting environment issue.

There are many factors that can only be controlled and fixed by your hosting company. For instance, if their DNS servers are unable to resolve requests in a timely manner, then this will cause cURL requests to timeout.

Another scenario could be slower connectivity or networking issues with your hosting server.

Simply drop them a support request with the error details and their technical staff can troubleshoot and apply a fix to solve it.

We hope this article helped you learn how to fix the cURL error 28 in WordPress. You may also want to bookmark our WordPress troubleshooting tips and our ultimate handbook on fixing common WordPress errors.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Источник

Curl error: 28 (OPERATION_TIMEOUTED) Fixed!

by Sijin George | Mar 28, 2019

Website errors are always frustrating. Errors are not at all welcoming especially when you are doing a last minute site update.

One such error is “Curl error: 28 (OPERATION_TIMEOUTED).”

In simple words, this happens when a timeout occurs while performing a curl request in the website. But, it becomes tricky to find the exact reason for timeout.

That’s why, we often get requests from customers to fix Curl errors as part of our Outsourced Technical Support Services.

Today, we’ll see how we helped customer to fix “Curl error: 28 (OPERATION_TIMEOUTED)“.

Background of “Curl error: 28”

Firstly, let’s get some details on the exact scenario of the error. In this case, customer approached us with a request saying:

“ When we automatically post to FB from our subdomains, we get a Curl error: 28 (OPERATION_TIMEOUTED) on some of the subdomains. Can you fix it please? “

To understand the error in a better way, our Dedicated Engineers checked his server. We found that he had Nginx web server running on the server. He was using a plugin to directly update Facebook page from his website. Moreover, the problem subdomain was a part of WordPress multi-site.

Additionally, customer was getting a 504 Gateway Time-out error in Nginx too.

Reasons for Curl error: 28 (OPERATION_TIMEOUTED)

Now, its time to see the reasons that can lead to “Curl error: 28 (OPERATION_TIMEOUTED)”.

In simple words, this error is related to the cURL library of the server. Therefore, it can affect any web software using cURL. WordPress websites use cURL library to communicate to other websites. And, when these cURL requests do not complete in a specified time, it ends up in Curl error: 28 (OPERATION_TIMEOUTED).

And, this cURL timeout can occur due to a variety of reasons. Let’s check them in detail now.

1. Network/Firewall settings

One of the typical reason for cURL error 28 could be the connection problems due to firewall or network. When there is a firewall between the server and the external website, it can block outgoing request. Similarly, it can happen when the remote server is not reachable due to network errors. Here, the website request keep on trying till the timeout value and eventually time out.

2. DNS resolution failures

Yet another reason for “Curl error: 28 (OPERATION_TIMEOUTED)” can be DNS failures. When the domain do not resolve properly, the website will not be reachable from the server. The cURL process wait for sometime to see if the connection succeeds. And, after sometime it times out and show the timeout error.

3. Server limits

Again, “Curl error: 28 “ can happen due to limits set in the various services too. In servers, every service has limits set in its own configuration file. For example, web servers like Nginx will have timeout values set in its configuration file.

And, some customers use Nginx as a reverse proxy before Apache server too. Therefore, there will be additional proxy timeout settings too. These timeout values are set in milliseconds. If the cURL request do not complete within these timeout period, it will show cURL errors. In some cases, it will show include the timeout value in milliseconds in the error log.

The other server settings that affect cURL issue include memory limit, timeout settings in PHP, WordPress timeout settings, etc. too.

4. Security modules

Occasionally, server security modules like Mod_Security could also block the outgoing cURL requests. Here, the security modules block some website requests assuming them as suspicious. Likewise, some long running process can also result in errors.

How we fix Curl error: 28

Till now, we saw the various reasons that can return error from the cURL request from the websites. We’ll now see how our Dedicated Engineers troubleshoot and fix “Curl error: 28 (OPERATION_TIMEOUTED)“.

As the first step of investigation, we check the web server log. This will give us a clue on where exactly is the cURL request failing. We, then check the website link directly. This will help us to rule out the possible problems at the remote server.

If the direct link to the remote website works, that means the problem happens due to server setting. For instance, when the customer had problems updating Facebook page from his subdomain, the Nginx log showed the following entries.

Here, the Nginx was failing to connect to Apache to load the website pages. It eventually timed out. And, this was causing the website cURL error in the server. Therefore, to fix the issue, we had to increase the Nginx proxy timeout value, followed by a web server restart.

As these tweaks involve changing the web server configuration, our Support Engineers always make it a point to minimize the impact. This include scheduling web server changes for off peak hours.

Similarly, tweaking the PHP Fast CGI parameters also help to solve curl errors in websites. And, in some cases, to fix, we may have to upgrade the PHP version on the server to the latest too.

[Are you getting Curl error: 28 (OPERATION_TIMEOUTED) in your website? We can fix it for you now.]

Conclusion

In short, Curl error: 28 (OPERATION_TIMEOUTED) happens when the curl request from the website takes too much time to complete. Today, we saw the typical reasons for the timeout and how our Support Engineers fix it.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

Источник

Website errors are always frustrating. Errors are not at all welcoming especially when you are doing a last minute site update.

One such error is “Curl error: 28 (OPERATION_TIMEOUTED).”

In simple words, this happens when a timeout occurs while performing a curl request in the website. But, it becomes tricky to find the exact reason for timeout.

That’s why, we often get requests from customers to fix Curl errors as part of our Outsourced Technical Support Services.

Today, we’ll see how we helped customer to fix “Curl error: 28 (OPERATION_TIMEOUTED)“.

Background of “Curl error: 28”

Firstly, let’s get some details on the exact scenario of the error. In this case, customer approached us with a request saying:

When we automatically post to FB from our subdomains, we get a Curl error: 28 (OPERATION_TIMEOUTED) on some of the subdomains. Can you fix it please?

To understand the error in a better way, our Dedicated Engineers checked his server. We found that he had Nginx web server running on the server. He was using a plugin to directly update Facebook page from his website. Moreover, the problem subdomain was a part of WordPress multi-site.

Additionally, customer was getting a 504 Gateway Time-out error in Nginx  too.

Reasons for Curl error: 28 (OPERATION_TIMEOUTED)

Now, its time to see the reasons that can lead to “Curl error: 28 (OPERATION_TIMEOUTED)”.

In simple words, this error is related to the cURL library of the server. Therefore, it can affect any web software using cURL. WordPress websites use cURL library to communicate to other websites. And, when these cURL requests do not complete in a specified time, it ends up in Curl error: 28 (OPERATION_TIMEOUTED).

And, this cURL timeout can occur due to a variety of reasons. Let’s check them in detail now.

1. Network/Firewall settings

One of the typical reason for cURL error 28 could be the connection problems due to firewall or network. When there is a firewall between the server and the external website, it can block outgoing request. Similarly, it can happen when the remote server is not reachable due to network errors. Here, the website request keep on trying till the timeout value and eventually time out.

2. DNS resolution failures

Yet another reason for “Curl error: 28 (OPERATION_TIMEOUTED)” can be DNS failures. When the domain do not resolve properly, the website will not be reachable from the server. The cURL process wait for sometime to see if the connection succeeds. And, after sometime it times out and show the timeout error.

3. Server limits

Again, “Curl error: 28 “ can happen due to limits set in the various services too. In servers, every service has limits set in its own configuration file. For example, web servers like Nginx will have timeout values set in its configuration file.

And, some customers use Nginx as a reverse proxy before Apache server too. Therefore, there will be additional proxy timeout settings too. These timeout values are set in milliseconds. If the cURL request do not complete within these timeout period, it will show cURL errors. In some cases, it will show include the timeout value in milliseconds in the error log.

The other server settings that affect cURL issue include memory limit, timeout settings in PHP, WordPress timeout settings, etc. too.

4. Security modules

Occasionally, server security modules like Mod_Security could also block the outgoing cURL requests. Here, the security modules block some website requests assuming them as suspicious. Likewise, some long running process can also result in errors.

How we fix Curl error: 28

Till now, we saw the various reasons that can return error from the cURL request from the websites. We’ll now see how our Dedicated Engineers troubleshoot and fix “Curl error: 28 (OPERATION_TIMEOUTED)“.

As the first step of investigation, we check the web server log. This will give us a clue on where exactly is the cURL request failing. We, then check the website link directly. This will help us to rule out the possible problems at the remote server.

If the direct link to the remote website works, that means the problem happens due to server setting. For instance, when the customer had problems updating Facebook page from his subdomain, the Nginx log showed the following entries.

2019/03/21 03:49:12 [error] 31646#0: *6853789 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 66.xx.xx.110, server: xxxx.com, request: "GET / HTTP/1.1", upstream: "http://2xx.1xx.xx.38:7080/", host: "xxxx.com"

Here, the Nginx was failing to connect to Apache to load the website pages. It eventually timed out. And, this was causing the website cURL error in the server. Therefore, to fix the issue, we had to increase the Nginx proxy timeout value, followed by a web server restart.

As these tweaks involve changing the web server configuration, our Support Engineers always make it a point to minimize the impact. This include scheduling web server changes for off peak hours.

Similarly, tweaking the PHP Fast CGI parameters also help to solve curl errors in websites. And, in some cases, to fix, we may have to upgrade the PHP version on the server to the latest too.

[Are you getting Curl error: 28 (OPERATION_TIMEOUTED) in your website? We can fix it for you now.]

Conclusion

In short, Curl error: 28 (OPERATION_TIMEOUTED) happens when the curl request from the website takes too much time to complete. Today, we saw the typical reasons for the timeout and how our Support Engineers fix it.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

ochibka-v-wordpress-001Приветствуем вас! Вы видите ошибку cURL 28: Превышено время ожидания соединения на вашем сайте WordPress? Ошибка cURL 28 — распространенная проблема WordPress REST API, которая может повлиять на производительность вашего веб-сайта и привести к его непредсказуемому поведению.

В этой статье мы покажем вам, как легко исправить проблему cURL error 28 на вашем веб-сайте WordPress.

Что такое cURL в WordPress?

CURL — это программная утилита, используемая WordPress и многими другими веб-приложениями для отправки и получения запросов данных с использованием URL-адресов.

WordPress использует cURL для обработки нескольких запросов API. Он доступен как расширение языка программирования PHP, и ваша хостинговая компания WordPress позаботится об этом.

Библиотека cURL играет решающую роль в том, как WordPress работает за кулисами. Если он не настроен должным образом, ваш веб-сайт не будет работать должным образом.

Что вызывает ошибку cURL 28 в WordPress?

Неспособность своевременно ответить на запросы данных сервера вызывает ошибку 28 cURL в WordPress.

WordPress использует REST API (метод программирования) для отправки и получения запросов данных. Если время ожидания этих запросов истекло, вы увидите это как критическую проблему в отчете о работоспособности сайта с заголовком «Ошибка REST API».

Расширение ошибки покажет вам дополнительную информацию, включая сообщение об ошибке:

Error: cURL error 28: Operation timed out after x milliseconds with x bytes received (http_request_failed)

Вы также можете увидеть другую связанную проблему с заголовком «Ваш сайт не может выполнить запрос обратной связи». В нем будет аналогичное сообщение об ошибке со следующим описанием.

«Запрос обратной связи к вашему сайту не удался, это означает, что функции, использующие их, в настоящее время не работают должным образом».

Что может вызвать тайм-аут cURL?

Ряд сценариев может вызвать тайм-аут cURL в WordPress:

  • Например, плагин брандмауэра WordPress может блокировать запрос REST API, считая его подозрительным действием.
  • Если ваш DNS-сервер работает некорректно, это также может вызвать сбой HTTP-запросов и вызвать ошибку тайм-аута cURL в WordPress.
  • Плохо настроенный хостинг-сервер может просто иметь очень низкий порог тайм-аута, что может помешать правильной работе определенных процессов WordPress.

Давайте посмотрим, как устранить и исправить данную проблему.

1. Временно отключите брандмауэр WordPress

Если вы используете брандмауэр WordPress или плагин безопасности, временно отключите его.

ochibka-v-wordpress-01

После этого вам нужно посетить страницу отчета о работоспособности сайта WordPress, чтобы узнать, решена ли ваша проблема.

Если да, то вам нужно проверить журналы брандмауэра WordPress, чтобы узнать, какие запросы API были заблокированы. Это либо определит источник проблемы, либо вы можете настроить параметры брандмауэра, чтобы не блокировать законные запросы API.

2. Отключите все плагины WordPress

Плагины WordPress создают собственные запросы API для отправки и получения данных. Если эти вызовы слишком часты или для выполнения требуется слишком много времени, это может вызвать ошибку cURL в отчете о работоспособности вашего сайта.

Самый простой способ выяснить это — отключить все плагины WordPress. Просто перейдите на страницу «Плагины»-«Установленные» и выберите все плагины.

ochibka-v-wordpress-02

После этого щелкните раскрывающееся меню «Массовые действия», чтобы выбрать «Деактивировать», а затем нажмите кнопку «Применить».

Теперь вы можете посетить отчет о работоспособности сайта, чтобы узнать, исчезла ли проблема. Если это устранило проблему, вы можете активировать свои плагины один за другим, пока проблема не появится снова.

Это поможет вам найти плагин, который может вызывать проблему.

3. Убедитесь, что ваш хостинг-сервер использует новейшее программное обеспечение

Следующий шаг — убедиться, что ваш хостинг-сервер WordPress использует последние версии PHP, библиотеки cURL и OpenSSL.

Вы можете проверить это, просмотрев вкладку системной информации на странице «Инструменты»-«Здоровье сайта».

ochibka-v-wordpress-03

Просто перейдите на вкладку «Информация» и разверните раздел «Сервер». Отсюда вы можете получить информацию о программном обеспечении, установленном на вашем хостинг-сервере WordPress.

ochibka-v-wordpress-04

В идеале ваш сервер должен использовать PHP 7.4.13 или выше, curl 7.74.0 или выше и OpenSSL 1.1.1 или выше.

Если это не так, вам необходимо связаться с вашей хостинговой компанией и попросить их обновить программное обеспечение для вашей учетной записи хостинга.

4. Устранение проблем с небезопасным контентом SSL

Если ваш сайт использует HTTPS / SSL, но он не настроен должным образом, это также может привести к тому, что ваш веб-сервер заблокирует небезопасные запросы cURL.

Точно так же, если ваш веб-сайт не использует HTTPS / SSL, но он сделал вызов API с использованием URL-адреса HTTP, то эти запросы тоже не будут выполнены, и вместо этого вы можете увидеть следующую ошибку cURL:

Ошибка: ошибка cURL 7: не удалось подключиться к порту localhost 443: в соединении отказано (http_request_failed)

Чтобы исправить это, вы можете попросить своего хостинг-провайдера переустановить сертификат SSL для вашего сайта.

5. Обратитесь за помощью к поставщику услуг хостинга

Если описанные выше действия не помогли устранить ошибку cURL 28 то, проблема, скорее всего, связана с средой хостинга.

Есть много факторов, которые могут контролироваться и исправляться только вашей хостинговой компанией. Например, если их DNS-серверы не могут своевременно разрешать запросы, это приведет к тайм-ауту запросов cURL.

Другой сценарий может заключаться в более медленном подключении или сетевых проблемах с вашим хост-сервером.

Просто отправьте им запрос в службу поддержки с подробными сведениями об ошибке, и их технический персонал сможет устранить неполадки и применить исправление для ее решения. Ну что, у нас на этом все. Всем пока!

С уважением Вячеслав и Валерия!

Понравился материал? Поделитесь с друзьями!

Интересное на блоге

Although WordPress is a reliable Content Management System (CMS), it’s not infallible, especially when you’re making high-level customizations to the software. Therefore, you might sometimes run into WordPress errors. One of these is “cURL error 28: connection timed out.”

The good news is there are a few ways to fix the cURL error 28 in WordPress. These methods range from simple fixes, such as deactivating your plugins, to more advanced procedures, like updating your SSL settings.

In this post, we’ll explore the cURL error 28 and its causes. Then, we’ll explain how to solve this issue in WordPress using six different methods. Let’s get started!

What Is the cURL Error 28 in WordPress?

Client URL, also known as cURL, is a command line tool. Simply speaking, it transfers data to and from a server through URLs.

In the context of WordPress, the CMS uses cURL within the REST API. cURL handles API requests, enabling your website to access and transmit data to its server and corresponding database.

Here’s what that process looks like:

The REST API

The REST API

This data transfer process takes a certain amount of time. However, if it takes too long, it can time out and display the “cURL error 28: connection timed out” message.

You will typically see this message in the Site Health section of your WordPress dashboard. The error will have the headline “The REST API encountered an error”. Clicking on this heading will expand the message, where you might see the following:

Error: cURL error 28: operation timed out after x milliseconds with x bytes received (http_request_failed)

Alternatively, you may see this related error message:

The loopback request to your site failed, this means features relying on them are not currently working as expected.

Although WordPress is reliable, it’s not infallible- which is where troubleshooting guides like this come into play! 🚀Click to Tweet

What Causes the “cURL Error 28: Connection Timed Out” Error?

There are a few reasons you might be seeing the cURL error 28. For example, your WordPress firewall might interpret a particular REST API request as suspicious. Then, it will prevent it from completing in an attempt to protect your website against malware or other security threats.

Alternatively, a faulty or poorly-configured DNS server may prevent WordPress from loading the HTTP requests correctly. The DNS server receives domain name requests and translates them into IP addresses, sending users to the correct websites. If this process doesn’t work properly, it can time out and throw the cURL error 28:

An image showing how a DNS server works

How a DNS server works

Furthermore, your hosting provider may have put a low timeout limit on your server. This configuration means WordPress doesn’t have the time it needs to transfer the data between your website and its database.

Finally, WordPress plugins can cause this error message. Third-party software may contain code or scripts that interfere with the cURL data transfer process.

How To Fix the cURL Error 28 in WordPress (6 Methods)

In this section, we’ll explain how to fix the cURL error 28 in WordPress. We recommend trying each method in turn until the error message disappears.

It’s also worth considering using a staging site for this process. Then, you can troubleshoot the problem without affecting your live site.

With a Kinsta hosting plan, you can upgrade to premium staging environments. Then you can use up to five different environments, easily accessible from your MyKinsta dashboard.

Once you’ve fixed the issue on your staging site, you can push the changes live to solve the problem on your live website. Let’s start by explaining how to temporarily disable your firewall.

1. Temporarily Disable Your WordPress Firewall

We briefly touched on the idea of a WordPress firewall before. Essentially, this WordPress security mechanism filters suspicious traffic and prevents it from reaching your website. Sometimes, it might also be incorrectly blocking a legitimate REST API request and causing “cURL error 28: connection timed out.”

To verify if the firewall is causing the error, you’ll want to disable it temporarily. This process will differ slightly depending on your chosen software. We’ll show you how to do this with the Wordfence plugin.

In your WordPress dashboard, head to Wordfence > Firewall. Then scroll down to Web Application Firewall Status:

How to disable the Wordfence firewall in WordPress

Disable the Wordfence firewall in WordPress

Select Disabled from the dropdown menu and click on Save Changes. Next, we recommend checking to see if your website still shows the cURL error 28.

After that, re-enable your firewall after a few minutes and see if it causes the error again. If so, consider choosing a different firewall plugin or contacting the plugin developers for further assistance.

2. Deactivate Your WordPress Plugins

Any of the WordPress plugins on your website could be causing the connection timeout error. Since you won’t know until you try them, this approach is all about trial and error. You’ll need to deactivate all your plugins and reinstall them one by one.

If you have access to your WordPress dashboard, this process is straightforward. Simply navigate to Plugins > Installed Plugins and check the top left box to select all of them. Then, click on Deactivate in the Bulk actions dropdown menu and hit Apply:

Bulk deactivating WordPress plugins

Deactivating WordPress plugins in bulk

Alternatively, if the cURL error 28 is blocking access to your WordPress dashboard, you’ll need to manually disable your WordPress plugins. To do this, connect to your site with an SFTP client such as FileZilla.

Then, locate your wp-content folder. It should have a sub-folder called plugins:

A screenshot showing how to disable WordPress plugins manually

Disabling a WordPress plugin manually

Rename this folder to “plugins-old”. This will deactivate all of the plugins on your website. Next, you can log in to your WordPress dashboard and reactivate each tool until you find the one causing the issue.

Once you’ve found the problem plugin, you might consider downgrading WordPress until you can find a permanent solution. Otherwise, you can uninstall the plugin and look for alternative software for your site.

3. Explore Your SSL Settings

A Secure Sockets Layer (SSL) certificate is an essential security feature. When working correctly, it provides an encrypted connection between visitor browsers and your WordPress website.

However, an improperly installed or configured SSL certificate can cause issues on your website and block what it considers “insecure” requests. Therefore, it might trigger the cURL error 28 or other SSL connection errors such as cURL error 7.

First, you can verify if your SSL certificate is installed correctly by running an SSL check with the Qualys SSL Labs test. Just enter your hostname into the box and click on Submit. You’ll then receive a report highlighting any issues:

Running an SSL check with Qualys SSL Labs

Qualys SSL Labs

As you can see, our Kinsta hosting plans come equipped with a Cloudflare SSL certificate, and the above report shows no issues.

However, if you identify a problem with your SSL certificate, you can reinstall and reconfigure it, making sure you do so properly. To be sure, you can follow these instructions on how to correctly install an SSL certificate. After that, you can check to see if this has resolved the error.

4. Verify Your DNS Settings

As we briefly explained before, a poorly-configured DNS server can prevent WordPress from processing HTTP requests. This can throw the cURL error 28.

You’ll need to contact your hosting provider if the issue is with the DNS server itself. Your web host may be experiencing issues that prevent the server from processing requests before they time out.

Since you can’t control this process on your end, we recommend raising a support ticket with your host. This way, the support team can help you troubleshoot the issue and propagate the new DNS settings to put them into effect.

You can also verify DNS settings on your end. This method will be appropriate if you suspect that the issue is with your device (i.e., your computer).

You can adjust your DNS settings in Windows by pressing Windows + I. Then head to Network & internet and click on either Ethernet or Wi-Fi, depending on how your computer connects to the internet. Next, select the properties option for your connection:

A screenshot showing how to access the network settings on Windows

Access the network settings on Windows

Now open the settings for the DNS server assignment:

Opening the DNS server assignment settings

DNS server assignment settings

Select Manual from the dropdown menu and click on the slider next to IPv4:

Enabling manual DNS settings on Windows

Enabling manual DNS settings on Windows.

In the Preferred DNS box, you can enter any of the following DNS addresses:

  • Cloudflare: 1.1.1.1
  • Google Public DNS: 8.8.8.8
  • OpenDNS: 208.67.222.222

Then add one of the others to the Alternate DNS box. Remember to hit Save when you’re done. You may need to restart your computer before the changes take effect.

5. Check Your Server Limits and cURL Version

Outdated software or limited server resources may cause cURL requests to time out. For example, outdated PHP, cURL library, or OpenSSL could trigger the cURL error 28.

To check on this, head to Tools > Site Health > Info > Server in your WordPress dashboard:

How to check your server settings in WordPress

Checking server settings in WordPress

You can read our article on the ideal WordPress PHP and server requirements to see if the values match up.

If they don’t, you can follow our guide on how to update your PHP version. Additionally, you can contact your hosting provider for further assistance or request to update the server configuration.

It’s also important to have some awareness of your website’s PHP memory limit and PHP time limit. This is because WordPress can time out when processing REST API requests if these limits are too low. As a result, this could cause a “508 resource limit is reached” or cURL error.

Again, your hosting provider generally sets the maximum values for these limits. Therefore, you’ll need to contact them if you’d like to increase the limits.

6. Contact Your Hosting Provider for Assistance

Finally, you may have tried all the troubleshooting methods in this tutorial, but you still see “cURL error 28: connection timed out”. While this can be frustrating, you have one last option: going directly to your web host for help.

If you’ve chosen a reliable hosting provider, you should have access to different support channels, such as live chat or a ticketing system. For example, at Kinsta, we provide live messaging and speedy responses:

Kinsta support website page

Kinsta Support

When you contact your hosting provider, make sure to give as much information as you can about the error you’re seeing. Then your host will be better equipped to troubleshoot the issue.

Whether you want a simple fix, such as deactivating your plugins, or a more advanced procedure, like updating your SSL, this guide has you covered 🛠Click to Tweet

Summary

“cURL error 28: connection timed out” can be frustrating to see when you’re working on your WordPress website. Fortunately, there are a few ways to troubleshoot this issue.

To fix the cURL error 28, we recommend starting with easy solutions like temporarily disabling your WordPress firewall and deactivating your plugins. Then, you can move on to checking your SSL and DNS settings, along with your server resource limits. Finally, if all else fails, it might be time to contact your web host for assistance.

Are you looking for a hosting provider to help you with any technical issues? Our Kinsta managed WordPress hosting packages come with 24/7 premium support. Plus, you’ll have access to our Kinsta APM tool for monitoring your website and improving its performance. Check out our plans today!


Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:

  • Easy setup and management in the MyKinsta dashboard
  • 24/7 expert support
  • The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
  • An enterprise-level Cloudflare integration for speed and security
  • Global audience reach with up to 35 data centers and 275 PoPs worldwide

Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.

В этой короткой статье мы расскажем, как устранить ошибку «cURL error 28: Connection timed out in XXXX milliseconds» при обновлении плагинов или тем WordPress. Это довольно распространённая ошибка, и связана она с сервером. В большинстве случаев она не вызывается ни какой-либо темой, ни плагином, и не самим WordPress.

Как исправить ошибку?

Первое, что нужно сделать, это обновить WordPress до актуальной версии.

Если это не помогло решить проблему, свяжитесь с поддержкой вашего хостинг-провайдера и уточните следующие моменты:

  • Убедитесь, что на сервере работает последняя версия PHP и библиотеки cURL.
  • Попробуйте увеличить параметр лимита памяти сервера (memory_limit).
  • Эта ошибка cURL может быть связана с проблемами, связанными с DNS. Если вы используете собственный сервер, попробуйте переключить конфигурацию на OpenDNS.
  • Уточните у провайдера, нет ли ограничений на выполнение wp-cron и не отключен ли loopback.
  • Уточните у провайдера, возможно, брэндмауэр или модули защиты (например, mod_security ) блокируют исходящие запросы cURL.

Are you seeing the cURL error 28: Connection timed out error on your WordPress site?

The cURL error 28 is a common WordPress REST API issue that can affect your website’s performance and may cause it to behave unpredictably.

In this article, we will show you how to easily fix the ‘cURL error 28: Connection timed out’ issue on your WordPress website.

Fixing the cURL error 28: Connection timed out issue in WordPress

What is cURL in WordPress?

The cURL is a software utility used by WordPress and many other web applications to send and receive data requests using URLs.

WordPress uses cURL to handle several API requests. It is available as an extension of the PHP programming language, and your WordPress hosting company takes care of that.

The cURL library plays a crucial role in how WordPress works behind the scenes. If it is not configured properly, then your WordPress website will not function properly.

What Causes cURL error 28 in WordPress?

Failure to respond back to the server’s data requests in a timely manner causes cURL error 28 in WordPress.

WordPress uses REST API (a programming technique) to send and receive data requests. If these requests time out, then you’ll see it as a critical issue in the Site Health report with the title ‘The REST API encountered in error’.

cURL error 28 shown in WordPress site health report

Expanding the error will show you further details including the error message:

Error: cURL error 28: Operation timed out after x milliseconds with x bytes received (http_request_failed)

You may also see another related issue with the title ‘Your site could not complete a loopback request’. It will have a similar error message with the following description.

‘The loopback request to your site failed, this means features relying on them are not currently working as expected.’

What may cause cURL to timeout?

A number of scenarios may cause the cURL to time out in WordPress.

For instance, a WordPress firewall plugin may block a REST API request considering it to be a suspicious activity.

If your DNS server is not working correctly, then this may also fail HTTP requests and cause the cURL timeout error in WordPress.

A poorly configured WordPress hosting server may simply have a very low timeout threshold which may stop certain WordPress processes to run properly.

That being said, let’s take a look at how to troubleshoot and fix the ‘curl error 28: Connection timed out’ issue in WordPress.

1. Temporarily Disable WordPress Firewall

If you are using a WordPress firewall or a security plugin, then go ahead and temporarily deactivate it.

Deactivate WordPress firewall plugin

After that, you need to visit the WordPress site health report page to see if your issue has resolved.

If it has, then you need to check your WordPress firewall logs to see which API requests have been blocked.

This would either identify the source of the issue or you can adjust firewall settings to not block legitimate API requests.

2. Deactivate All WordPress Plugins

WordPress plugins make their own API requests to send and receive data. If these calls are too frequent or take too long to complete, then this may cause the cURL error in your site health report.

The easiest way to figure this out is by deactivating all WordPress plugins. Simply go to the Plugins » Installed Plugins page and select all plugins.

Deactivate all WordPress plugins

After that, click on the Bulk Actions drop down to select ‘Deactivate’ and then click on the ‘Apply’ button.

You can now visit the Site Health report to see if the issue has disappeared. If this resolved the issue, then you can start activating your plugins one by one until the issue reappears.

This will help you find the plugin that may be causing the issue and you can then ask the plugin author for support.

3. Ensure Your Hosting Server is Using the Latest Software

The next, step is to make sure that your WordPress hosting server is using the latest versions of PHP, cURL library, and OpenSSL.

You can check that by looking at the system information tab under Tools » Site Health page.

System information report under site health

Simply switch to the ‘Info’ tab and expand the ‘Server’ section. From here you can get the information about software installed on your WordPress hosting server.

Check PHP, cURL, and OpenSSL versions

Ideally, your server should be using PHP 7.4.13 or higher, curl 7.74.0 or higher, and OpenSSL 1.1.1 or higher.

If it doesn’t, then you need to contact your WordPress hosting company and request them to update the software for your hosting account.

4. Fix SSL Insecure Content Issues

If your WordPress site is using HTTPS / SSL, but it is not configured properly, then this could also lead your web server to block insecure cURL requests.

Similarly, if your WordPress site doesn’t use HTTPS / SSL, but it made an API call using an HTTPs URL, then those requests will fail too, and you may see the following cURL error instead:

‘Error: cURL error 7: Failed to connect to localhost port 443: Connection refused (http_request_failed)

cURL error 7 in WordPress

To fix this, you can ask your hosting provider to re-install SSL certificate for your website. If the issue persists, then follow our guide on how to fix common SSL issues to properly set up SSL on your WordPress website.

5. Seek Help from Hosting Provider

If the above steps fail to resolve the cURL error 28 on your WordPress site, then the problem is most likely a hosting environment issue.

There are many factors that can only be controlled and fixed by your hosting company. For instance, if their DNS servers are unable to resolve requests in a timely manner, then this will cause cURL requests to timeout.

Another scenario could be slower connectivity or networking issues with your hosting server.

Simply drop them a support request with the error details and their technical staff can troubleshoot and apply a fix to solve it.

We hope this article helped you learn how to fix the cURL error 28 in WordPress. You may also want to bookmark our WordPress troubleshooting tips and our ultimate handbook on fixing common WordPress errors.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. We have been creating WordPress tutorials since 2009, and WPBeginner has become the largest free WordPress resource site in the industry.

Some time this error in Joomla appear because some thing incorrect with SESSION or coockie.
That may because incorrect HTTPd server setting or because some before CURL or Server http requests

so PHP code like:

  curl_setopt($ch, CURLOPT_URL, $url_page);
  curl_setopt($ch, CURLOPT_HEADER, 1);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  curl_setopt($ch, CURLOPT_TIMEOUT, 30); 
  curl_setopt($ch, CURLOPT_COOKIESESSION, TRUE);
  curl_setopt($ch, CURLOPT_REFERER, $url_page);
  curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
  curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__) . "./cookie.txt");
  curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__) . "./cookie.txt");
  curl_setopt($ch, CURLOPT_COOKIE, session_name() . '=' . session_id());

  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  if( $sc != "" ) curl_setopt($ch, CURLOPT_COOKIE, $sc);

will need replace to PHP code

  curl_setopt($ch, CURLOPT_URL, $url_page);
  curl_setopt($ch, CURLOPT_HEADER, 1);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  curl_setopt($ch, CURLOPT_TIMEOUT, 30); 
//curl_setopt($ch, CURLOPT_COOKIESESSION, TRUE);
  curl_setopt($ch, CURLOPT_REFERER, $url_page);
  curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
//curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__) . "./cookie.txt");
//curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__) . "./cookie.txt");
//curl_setopt($ch, CURLOPT_COOKIE, session_name() . '=' . session_id());

    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); // !!!!!!!!!!!!!
  //if( $sc != "" ) curl_setopt($ch, CURLOPT_COOKIE, $sc);

May be some body reply how this options connected with «Curl error: Operation timed out after ..»

Estimated reading time: 1 min

In this article

  • 1. How to fix it ?

This quick article helps your solve a  cURL error 28 displayed in your WordPress admin :

cURL error 28: Connection timed out after n milliseconds

or

cURL error 28: Operation timed out after n milliseconds with 0 out of 0 bytes received

This problem is a very common server related issue. In most of the cases not created by a particular theme or plugin, nor by WordPress.

How to fix it ?

The first thing to do is to update your WordPress to the latest version if not already done.

Then if the problem is still there, contact your hosting company and ask the hosting support team to check the following points :

  • Make sure your server is running a recent version of PHP and the cURL library.
  • Try to increase your Server Memory Limits settings.
  • The cURL error can be a dns related issue. Your hosting company might need to switch dns configuration to OpenDNS : https://www.howtogeek.com/164981/how-to-switch-to-opendns-or-google-dns-to-speed-up-web-browsing/
  • Ask your host if there is some limitation with wp-cron, or if loopback is disabled.
  • Ask your host if there a firewall or security modules (e.g. mod_security ) that could block the outgoing cURL requests.

You can also install the Query Monitor plugin and check the status of the HTTP API Calls in the admin page where the error is displayed.

Was this article helpful?

Like 3 Dislike 3

Image credits : pexels.com

This quick article helps your solve a  cURL error 28 displayed in your WordPress admin :

cURL error 28: Connection timed out after n milliseconds

or

cURL error 28: Operation timed out after n milliseconds with 0 out of 0 bytes received

This problem is a very common server related issue. In most of the cases not created by a particular theme or plugin, nor by WordPress.

How to fix it ?

The first thing to do is to update your WordPress to the latest version if not already done.

Then if the problem is still there, contact your hosting company and ask the hosting support team to check the following points :

  • Make sure your server is running a recent version of PHP and the cURL library.
  • Try to increase your Server Memory Limits settings.
  • The cURL error can be a dns related issue. Your hosting company might need to switch dns configuration to OpenDNS : https://www.howtogeek.com/164981/how-to-switch-to-opendns-or-google-dns-to-speed-up-web-browsing/
  • Ask your host if there is some limitation with wp-cron, or if loopback is disabled.
  • Ask your host if there a firewall or security modules (e.g. mod_security ) that could block the outgoing cURL requests.

You can also install the Query Monitor plugin and check the status of the HTTP API Calls in the admin page where the error is displayed.


If you are experiencing this issue or other ones when updating your theme, we have gathered a list of common problems ( with solutions ) that can occur when updating your theme.

Did this answer your question?


Thanks for the feedback

There was a problem submitting your feedback. Please try again later.

Last updated on January 11, 2021

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Cuda error 2 on device 0 out of memory
  • Cuda error 100 no cuda capable device is detected
  • Cuda driver version is insufficient for cuda runtime version как исправить
  • Cuda driver api error
  • Cucm database communication error

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии