Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 832
Danesh-Ju Com Avatar asked May 20 '17 06:05

Danesh-Ju Com


2 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

like image 189
PLA Avatar answered Nov 07 '22 22:11

PLA


As reported here: https://wordpress.org/support/topic/dropbox-upload-fails-with-curl-timeout-error/ 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.

like image 25
user1617078 Avatar answered Nov 07 '22 22:11

user1617078