Curl error: 28 (OPERATION_TIMEOUTED) Resolving

Many users occasionally get the curl error 28 error on their website. It can disrupt the website’s functions and cause several inconveniences. The curl error:28 operation timeout error is caused when the admin is executing a curl request on a given website. There can be many reasons why this error is caused. In this article, we will cover all the causes and the fixes for this error.


Factors for “Curl error: 28” (OPERATION_TIMEOUTED) Occurrence

Let us try to understand the cause of the curl error 28. This error has a close relation to the cURL library of a server. Any web software that uses the cURL library can go down because of this error. Users around the world utilize the cURL library in their WordPress websites. It allows them to communicate with other websites and if the request cannot be completed in a defined time, then the curl error 28 comes up.

Below, we discuss some of the common causes of this error.

  • Settings of firewall or Network

    An improper firewall setting or the network of your system can be the most probable cause of this error. Network errors can cause communication failure between the external website and server. A firewall present between the website and the server will block the outgoing connection request. Here, the website keeps trying to connect to the server and after a specified time there is a time out.

  • Failures in DNS Resolution

    When there is a failure in the DNS resolution, this error can be generated. Failure in the DNS resolution will prevent the website from reaching the server. The website’s cURL section will keep on trying till the connections succeed and if it takes too long, then it will throw the cURL error:28.

  • Limit Settings in Servers

    Sometimes there are certain settings in the server that have been limited. These limits can cause this error. There could be limited timeout values in the configuration files in the Nginx web servers. Other services can have limits too that can be found in the configuration files. Many clients use a reverse proxy for their Apache server. There shall be an additional proxy timeout setting in such cases.

The unit of these timeout values is in milliseconds. Failure to complete the cURL request within these time limits will cause the error. The error log will contain these timeout values. Aside from this, the PHP timeout setting, memory limit, WordPress timeout settings, and many others can also cause the cURL error.

  • Security Elements

    Servers have certain security features and modules that can block outgoing requests. One example of this would be Mod_Security. It can block the outgoing cURL requests as it might consider them suspicious.

How We Resolve the Curl error: 28

Now that we know the causes of the cURL error 2, we can move forward to discuss the solutions for this. 

The web server log can show us why the cURL request is not completed successfully. So, we shall begin by looking at the web server log. After that, we can look at the link to the website that has the problem. Looking at the link to the website will help us to make sure that the error is not due to the server. If the link works, then the problem is with the server settings. We can increase the timeout value to establish the connection and restart the server. Upgrading the PHP version and changing PHP Fast CGI parameters can also fix the error.


To conclude this article, we have now discussed all the possible causes and solutions to resolve the curl error: 28 (OPERATION_TIMEOUTED).