Debugging a very old code today found Nginx server timeout changed the Nginx configuration
The discovery is that the background script has been waiting for troubleshooting until the last discovery was caused by a curl timeout
Specific solutions:
curl_setopt ($this->ch, Curlopt_url, $url);
curl_setopt ($this->ch, Curlopt_returntransfer, 1);
curl_setopt ($this->ch, curlopt_timeout_ms,3000); 3-second timeout
curl_setopt ($this->ch, Curlopt_header, 0);
curl_setopt ($this->ch, Curlopt_ssl_verifypeer, false);
curl_setopt ($this->ch, Curlopt_ssl_verifyhost, false);
PHP Curl Time-out of the main 4 parameters of the original text as follows;
There ' s a very distinctive difference between these, configurations within CURL. I ' ll try to define them for you, and then provide you a very common example which I share to people who I teach about CURL .
Curlopt_connecttimeoutis designed to tell the script how long to wait for make a successful connection to the server before starting to buffer th E output. A destination ' s server which may is overloaded, offline or crashed would probably make this setting become useful.
Curlopt_timeoutis designed-to-tell the script, a long to wait-to-receive a completely buffered output from the server. A destination ' s huge file, slow connection speeds or slow rendering would probably make this setting become.
A Good example of where these would both apply to, was when you ' re telling cURL to download a MP3 file. Curlopt_connecttimeout would be set on about ten seconds which would mean that if No. response is provided within Then the script would abort, and Curlopt_timeout would be set at about seconds which would mean if the MP3 have not Dow nloaded within seconds then abort the script. It's the best-of-the-explaining it to developers.
The specific is:
Curlopt_connecttimeout
Time-out settings when establishing a connection
Curlopt_timeout
Time-out setting when receiving information
Curlopt_connecttimeout_ms, Curlopt_timeout_ms means the same as just the timeout unit for milliseconds ...
PHP Curl Timeout problem