I cannot follow this step:
- changed installer.php timeout manually to 1200 sec (line 277)
I find in the nextcloud www documentroot, but cannot found any file with name ‘installer.php’
Please help me, which location could that installer.php file?
installer.php I changed is in public_html/nextcloud/lib/private
But…
I think this way of doing things is not really good because I am not educated enough and when I am changing php files I am just guessing what I am doing.
Better way I found is to download whole package from here and then upload it here: public_html/nextcloud/apps/documentserver_community using your cpanel file manager and then extract in the same folder.
When you log in to http://yourdomain/nextcloud and go to Apps you will see the app there and just enable it.
This is the most fool proof way if you are a noob like me. (maybe not … I am a noob so I might be completely wrong)
From what I read, this package doesn’t download because default settings are made under assumption that everyone has fast internet connection and this is 300 MB download.
Good luck!
Содержание
- Community Document Server — cURL error 28: Operation timed out after 120000 millisecond #133
- Comments
- Footer
- How to fix cURL error 28: Connection timed out after X milliseconds
- What is cURL in WordPress?
- What Causes cURL error 28 in WordPress?
- 1. Temporarily Disable WordPress Firewall
- 2. Deactivate All WordPress Plugins
- 3. Ensure Your Hosting Server is Using the Latest Software
- 4. Fix SSL Insecure Content Issues
- 5. Seek Help from Hosting Provider
- Как исправить ошибку cURL 28: время ожидания соединения истекло
I also get this (see thread in link ^^) on trying to install the app from the webui : /settings/apps/app-bundles/documentserver_community
I am able to get somewhere between 1/2 and 3/4 of the data
The text was updated successfully, but these errors were encountered:
I am in the same boat here, my NextCloud instance was installed via Snap on Ubuntu and I can’t edit the Client.php file in htaccess file. The timeout needs to be set longer (unless you have fiber or reliably fast broadband the 30-second mark is not long enough to download the document control server for OnlyOffice integration), please!
A change in the /lib/private/Installer.php file may help
$ timeout = $ this-> isCLI? 0: 120; for example: 300
I can only change in this file helped 😃
And it helps me to solve the problem. My value is 1200.
I am experiencing the same issue. I changed that timeout value in /lib/private/Installer.php to 1200 and it still fails for me.
Perhaps you should increase again the value, depends on your server Internet connection. The worse it is, heighest athe value has to be.
Closing as duplicate of #26
I am experiencing the same issue. I changed that timeout value in /lib/private/Installer.php to 1200 and it still fails for me.
In case you are also wondering where the above mentioned file is exactly, it is in the ‘nextcloud’ folder in the web service space on your hosting machine.
In my Ubuntu+Apache2 case, the full address is: /var/www/nextcloud/lib/private/Installer.php
© 2023 GitHub, Inc.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
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 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.
Другой сценарий может заключаться в более медленном подключении или сетевых проблемах с вашим хост-сервером.
Просто отправьте им запрос в службу поддержки с подробными сведениями об ошибке, и их технический персонал сможет устранить неполадки и применить исправление для ее решения. Ну что, у нас на этом все. Всем пока!
Источник
Приветствуем вас! Вы видите ошибку 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.
Другой сценарий может заключаться в более медленном подключении или сетевых проблемах с вашим хост-сервером.
Просто отправьте им запрос в службу поддержки с подробными сведениями об ошибке, и их технический персонал сможет устранить неполадки и применить исправление для ее решения. Ну что, у нас на этом все. Всем пока!
С уважением Вячеслав и Валерия!
Понравился материал? Поделитесь с друзьями!
Интересное на блоге
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»;
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:
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:
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:
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:
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:
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:
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:
Now open the settings for the DNS server assignment:
Select Manual from the dropdown menu and click on the slider next to IPv4:
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:
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:
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.
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 ..»
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.
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 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.
- WordPress Tutorials
- 2 Comments
- February 17, 2022
- 6 March 2022
Suppose you are a web designer and spend a lot of time in the WordPress environment every day. You may encounter cURL Error 28: Connection Timed Out. This error is one of the most common problems in WordPress. In this article, we will discuss ways to solve this problem.
What is cURL
cURL is software that is used in WordPress and many other web applications. This software is used to send and receive data requests via URL. WordPress uses this software to respond to API requests. cURL is an extension for the PHP programming language, and your host is responsible for protecting and supporting it. If you do not configure cURL properly, your WordPress website will crash and may not work correctly.
CURL Error 28: Connection Timed Out
You may be looking for the cause of this error. The error happens when your server does not respond to requests on time. WordPress uses a programming method called REST API to send and receive data requests. If the time for responding to these requests expires; You will see REST API Encountered in Error in the health section of your site. This message will be displayed to you when this error spreads:
Error: cURL error 28: Operation timed out after x milliseconds with x bytes received (http_request_failed)
In this case, you may encounter another error telling you that your site is not responding to a return request or is unable to complete the process. In such cases, you will probably see an error similar to this one:
The loopback request to your site failed; this means features relying on them are not currently working as expected.
Factors
Some of the factors that cause WordPress cURL to crash:
- Some wordpress firewall plugins may prevent you from requesting the REST API. This is because the REST API plugin is considered suspicious activity.
- The next case may be due to your DNS server. If your DNS server is not working properly, it may cause some issues such as unsuccessful HTTP requests and eventually time out error in wordpress.
How to Solve cURL Error 28: Connection Timed Out
There are several ways to solve this problem that you can use if necessary:
Disable the firewall
First of all, if you are using a firewall or security plugin in WordPress, it is better to disable it for a while and then go to the health page of your site and check if the problem is solved or not. If the issue is resolved, you should check the logins in your WordPress firewall and find the blocked account. By doing this, you will find the source of the problem and problem, and according to it, you can make firewall settings to prevent the blocking of legal APIs.
Disable plugins
The second method is to disable any plugins you have running on WordPress. Because these plugins also send their requests, sometimes you may see a cURL error due to sending many requests and back. The easiest way to find out is to go to the installed plugins section and select and disable all plugins. Now go to the health section of your site, and if you visit the site without any problems, you will notice that the problem was with the plugins. Activate them one by one to re-create the problem and find the plugin that caused the problem. You can then investigate the plugin that caused this problem and fix the problem.
Updated versions of PHP, cURL, OpenSSL
The next step is to ensure your site server is running the latest version of PHP, cURL, and OpenSSL. To find out about this from the WordPress menu, from the Tools section, click on Site Health. When you enter the health page of your site, go to the information section. Then click on the server option. From this section, you can easily find out what version of PHP, cURL, and OpenSSL your server is using if you notice that your site server is not using new and updated versions. You should contact your hosting company and ask them to increase these versions for you.
Troubleshoot SSL insecure content
If you have an SSL certificate for your site and you do not configure it properly. It causes your webserver to block insecure cURL requests. That’s why you need to make sure your SSL certificate is configured correctly. Even if your site does not have an SSL certificate, you may encounter the following error.
‘Error: cURL error 7: Failed to connect to localhost port 443: Connection refused (http_request_failed)
You can also tick your hosting company to solve this problem. Request that an SSL certificate is installed on your site. Suppose this error persists after installing SSL. Send a ticket to your hosting and ask to follow the reason for this error.
Error not resolved? Contact your host.
If your site still gives a cURL 28 error after completing the above steps. Most likely, the problem is with your hosting provider. There are so many essential factors only available to the web host, and you can not control and fix them. For example, if your web servers fail to resolve your requests, the site will encounter this error.
We hope this article has helped you fix the cURL 28 error. Also, if you have any experience in this field, let us know in the comments below.
Good luck.
I installed nextcloud last night with default config using the official docker image.
Everything is working fine, can upload/download files. When I try to install any app, it times out with error
cURL error 28: Operation timed out after 120001 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://objects.githubusercontent.com/github-production-release-asset-2e65be/71471849/5d7bef73-eb2e-4fea-b52c-523f1afc3b38?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20211111%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20211111T041954Z&X-Amz-Expires=300&X-Amz-Signature=7570de1c79a7bbce4b993231861d2256eb78538809512568c64702e9d8501ba1&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=71471849&response-content-disposition=attachment%3B%20filename%3Dtasks.tar.gz&response-content-type=application%2Foctet-stream
So far I tried with tasks and onlyoffice, both failed. I was able to install calendar app last night though.
I checker reachability from both nextcloud container and host server and everything is working fine, can reach the destination urls using curl.
Don’t know what the problem is, where should I look?