Bobcares

For every $500 you spend, we will provide you with a $500 credit on your account*

BLACK FRIDAY SPECIAL

*Get up to $4000, Offer valid till November 30th, 2024

For every $500 you spend, we will provide you with a $500 credit on your account*

BLACK FRIDAY SPECIAL

*Get up to $4000, Offer valid till November 30th, 2024

Curl error: 28 (OPERATION_TIMEOUTED) Fixed!

by | 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.

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";

1 Comment

  1. Md Gulam Rabbi

    good Background of “Curl error: 28”

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

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

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF