504 Gateway Time-out when calling curl_exec() in PHP with SSL peer verification (CURLOPT_SSL_VERIFYPEER) off

Ben Johnson ben at indietorrent.org
Mon Aug 26 14:37:57 UTC 2013


Thanks for the suggestion, itpp2012.

I tried adding those directives to the batch script that starts
php-cgi.exe, but the problem persists.

What I find strange is that the problem occurs only when I set peer
verification to false:

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

When I set this value to true, I at least receive a response.

Maxim, you said:

"What URL is requested by your script? Symptoms described suggest
you are requesting some php script from the same server, and 504
is likely due to only one php backend process."

If this were the root cause, wouldn't the cURL call fail in the way way,
regardless of the CURLOPT_SSL_VERIFYPEER value? In other words, it
doesn't seem like changing this cURL option would change the number of
backend processes required to handle the request(s). But I could be wrong.

I'm pretty much out of ideas. Any further troubleshooting tips would be
much appreciated.

Thanks!

-Ben

On 8/24/2013 5:29 AM, itpp2012 wrote:
> set PHP_FCGI_CHILDREN=0
> set PHP_FCGI_MAX_REQUESTS=10000
> 
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,242154,242181#msg-242181
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
> 



More information about the nginx mailing list