cURL error 28: Resolving timed out after 5001 milliseconds

I use WordPress and I recently moved my site from the cpanel host to a Linux server with directadmin panel. Right after the transfer realized that customers have the following error when downloading via EDD plugin.

cURL error 28: Resolving timed out after 5001 milliseconds

I also got this error of w3_total_cache plugin.

Server informatin: Centos 6.8 (Final) cURL 7.54.0 (Final) directadmin

5 Answers

cURL error 28: Resolving timed out after 5001 milliseconds means DNS resolving failed.

so just change the DNS server list in /etc/resolv.conf.

or maybe we can bind the hostname and ip address in /etc/hosts.

this image shows the demo.

curl resolving timed out

As reported here: You can apply this temporary fix to extend the HTTP request timeout:

add_filter( 'http_request_timeout', function( $timeout ) { return 60; }); 

Wordpress default is 5 seconds.

To resolve this you have to set the curl connection time out and time out value at the time of curl initialization.
Just changes this two property value.

CURLOPT_CONNECTTIMEOUT => 30, CURLOPT_TIMEOUT => 60, 

For more details check This.

update these two lines here: /usr/share/icingaweb2/modules/jira/library/Jira/RestApi.php

 $opts = array( CURLOPT_URL => $this->url($url), CURLOPT_HTTPHEADER => $headers, CURLOPT_USERPWD => $auth, CURLOPT_CUSTOMREQUEST => \strtoupper($method), CURLOPT_RETURNTRANSFER => true, CURLOPT_CONNECTTIMEOUT => 30, CURLOPT_TIMEOUT => 30, 

You can set set_time_limit(120); in the wp-config.php after the MySQL settings section.

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like