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!
Check Out Our Video Guide To Fixing the “cURL Error 28: Connection Timed Out”
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!

В этой статье мы покажем вам, как легко исправить проблему 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.
Другой сценарий может заключаться в более медленном подключении или сетевых проблемах с вашим хост-сервером.
Просто отправьте им запрос в службу поддержки с подробными сведениями об ошибке, и их технический персонал сможет устранить неполадки и применить исправление для ее решения. Ну что, у нас на этом все. Всем пока!
С уважением Вячеслав и Валерия!
Понравился материал? Поделитесь с друзьями!
Интересное на блоге
Themeisle content is free. When you purchase through referral links on our site, we earn a commission. Learn More
Want to fix the “cURL error 28” on your WordPress website?
It’s common to encounter errors while operating a WordPress website. The “cURL error 28” occurs when the cURL (a communication tool) operation times out after the server takes too long to respond to a request.
In the following tutorial, you will learn why the server fails to respond to a request, what exactly the cURL is used for, and how to remove the cURL error and get your WordPress website up and running in no time.
Let’s get started.
What is the cURL error 28? Why does it occur?

To understand the cURL error 28, you must first understand the role of cURL in your WordPress website.
Short for Client for URL, cURL is a tool used to communicate with external services such as social media platforms, payment gateways, and email marketing services, among other things.
Beyond that, cURL is also used while updating plugins, themes, and the WordPress core. The tool connects with the wordpress.org servers and helps retrieve the latest software version.
In more technical terms, cURL lets WordPress (and other services) send and receive data using URLs.
👉 There are different types of cURL errors and they occur due to reasons like:
- Failure of SSL certificate verification because it’s outdated or invalid or due to incorrect server configuration.
- Inability to connect with remote servers (of wordpress.org, email marketing services, payment gateway, and social media API servers) due to slow server response time, network connectivity issues, incorrect server configurations, or firewall restrictions.
- The remote server returns an HTTP error code, which can be caused due to problems with the database, website code, or server configurations.
- Outdated versions of WordPress, plugins, themes, and even PHP can cause cURL errors due to incompatibilities with newer versions of cURL.
- DNS issues like incorrect DNS records, misconfigured DNS servers, or DNS cache issues can also cause the cURL error.
While these are the common causes of cURL errors, the cURL error 28 typically occurs due to the cURL operation timing out happening because the server took too long to respond.
Before we dive 🤿 into the solution, let’s take a look at some of the cURL error variations:
- CURLE_OPERATION_TIMEDOUT or cURL error: 28 (OPERATION_TIMEOUTED)
- CURLE_COULDNT_CONNECT
- CURLE_SSL_CACERT
- CURLE_HTTP_RETURNED_ERROR
To fix the cURL error 28, you can try the following troubleshooting steps:
- Disable the firewall 🔥
- Deactivate plugins 🔌
- Check for SSL misconfiguration 🔒️
- Update PHP & cURL versions 📥
- Verify DNS settings 👨💻
Please note that you don’t have to complete all the steps simultaneously. You need to take one step at a time and then check your site to see if the error is gone. If the error persists, then proceed with the next step.
Also, take a backup of your website before trying any of these troubleshooting steps.
In the following solutions, you will be asked to carry out steps like deactivating plugins and updating PHP versions, among other things. These solutions could cause your website to break. The backup will be your safety net. In case things don’t go as planned, you can get your website up and running using the backup.
One more thing: clear your browser cache and check whether the error is still showing.
Browser caching is a technique used by web browsers to temporarily store website data, such as images and stylesheets, to reduce page loading time for subsequent visits to the same page.
Some WordPress errors appear temporarily and get removed within a few minutes. But you may still see the error because you are shown the cached page version. Therefore, clear your cache and make sure the error is still showing on your site before proceeding with the solutions.
1. Disable the firewall 🔥
Firewalls are meant to monitor your site and prevent malicious visitors from accessing it. Sometimes the firewall accidentally blocks legitimate requests causing a delay in the server response and this triggers the cURL error 28.
WordPress websites contain different types of firewalls. Some sites have a dedicated plugin installed, others have a firewall installed as an add-on to a security plugin or CDN (content delivery network).
You can disable the standalone dedicated firewall plugin from your WordPress dashboard (or via FTP if you can’t access your WordPress dashboard).
As for security services, a few of them have dashboards that can be accessed from the WordPress dashboard and others have external dashboards that can be accessed from the security plugin’s website. Wherever the dashboard is located, you need to find it and disable the firewall.

CDNs also typically have external dashboards. Access it and disable your CDN’s firewall.
Now check whether your website is still showing the cURL error 28.
If disabling the firewall didn’t work then try the next solution.
2. Deactivate plugins 🔌
WordPress plugins and themes often make API requests to send and receive data from remote servers. When remote servers take too long to respond to that request, cURL operation times out triggering the cURL error 28.
So in this section, we will figure out whether a plugin or theme is causing the error on your website by deactivating them.
To deactivate your current theme, go to Appearance → Themes and activate any default WordPress themes like Twenty Twenty-Three or Twenty Twenty-Two, etc. Then check if the error is gone.

Next, deactivate all the plugins by going to Plugins → Installed Plugins. Select all the plugins, choose the Deactivate option, and hit the Apply button.

Check your site to see whether the error is showing. If it’s not then the next step is to find the culprit plugin.
This can be done by activating the plugin individually and then checking your website each time a plugin is activated. The culprit plugin will trigger the error as soon as it’s activated. Remove that plugin from your site and replace it with an alternative.
If you can’t access your WordPress dashboard, you can disable themes and plugins using FTP.
3. Check for SSL misconfiguration 🔒️
Improper SSL installation causes web servers to consider certain cURL requests as insecure. This can trigger errors like the cURL error 28 or cURL error 7 (http_request_failed).
To verify whether your SSL certificate is the real culprit, you need to check your SSL installation using the Qualys SSL Labs test. Just insert your URL and hit the Submit button. The tool will run a few tests and show you any misconfigurations it finds in your SSL installation.
SSL misconfigurations can be resolved by reinstalling the certificate.
For reinstallation, you will need to seek help from your SSL vendor which could be your hosting provider or an independent SSL provider.
4. Update PHP & cURL versions 📥
To check whether you are using the latest versions of PHP and cURL do a quick Google search and note down the latest versions of both software.
Next, open your WordPress dashboard and go to Tools → Site Health → Info → Server.

Do your PHP and cURL versions match with the latest versions? If not then you need to update them. We have already covered how to update PHP in a different article. As for updating the cURL, you need to contact your hosting server and ask them to update the software for you.
5. Verify DNS settings 👨💻
A DNS misconfiguration can also cause the cURL error 28 to appear on a WordPress website.
DNS misconfiguration can occur on your local computer or your hosting server. We recommend verifying your computer’s DNS settings first. Here’s how:
👉 Windows
Using the Windows start button, go to Settings → Network & Internet, select Wi-Fi or Ethernet, whichever you are using, and check on Properties.

Select the Edit button in the DNS server assignment option. A new window will appear with a dropdown menu. From the menu select Manual and toggle the IPv4 option On.
Then in the Preferred DNS box, enter the following Google Public DNS address: 8.8.8.8.
And in the Alternate DNS box, enter the Cloudflare DNS address: 1.1.1.1.
Hit the Save button and check whether the cURL error is still appearing on your website.

👉 macOS
Go to System Preferences → Network.
Select your current local area connection and hit the Advanced button.
Next, select the DNS tab.
Click on the + button at the bottom of the DNS servers list and enter an IPv4 (8.8.8.8) or IPv6 (2001:4860:4860::8888) address.
Make sure to click OK when you’re finished.

If the error is still showing, talk to your hosting provider. Tell them about all the steps you have taken to fix this error. They should be able to quickly verify and fix any errors from their end.
Fix cURL error 28 for good 🧰
The cURL error 28 is a common WordPress error that occurs due to reasons like SSL certificate misconfiguration, outdated software, DNS misconfiguration, and inability to connect with remote servers, among other things.
To fix this particular WordPress error, you need to take the following steps:
- Disable the firewall
- Deactivate plugins
- Check for SSL misconfigurations
- Ensure PHP and cURL are up-to-date
- Verify DNS settings on your computer and hosting server
💻️ For some other ways to keep your WordPress site working, you can check out our guide 👉 on how to fix 20+ common WordPress errors.
If you have any questions about the cURL error 28, let us know in the comment section below.
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»;
Стоит задача парсинга robots.txt. Использую php curl.
На некоторых сайтах получаю ответ типа
cURL Error (28): Operation timed out after 30001 milliseconds with 0 bytes received
Увеличение таймаута не решает проблему.
Сам код парсинга:
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_REFERER, $url);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
$robots = curl_exec($ch);
$curl_errno = curl_errno($ch);
$curl_error = curl_error($ch);
curl_close($ch);
для примера урл: https://www.adidas.ru/robots.txt















