Is it possible to extend a 504 timeout in nginx on a per location basis
Posted
by
codecowboy
on Server Fault
See other posts from Server Fault
or by codecowboy
Published on 2014-06-12T14:41:40Z
Indexed on
2014/06/12
15:27 UTC
Read the original article
Hit count: 223
Is it possible to set timeout directives within a location block to prevent nginx returning a 504 from a long running PHP script (PHP-FPM?
location /myurlsegment/ {
client_body_timeout 1000000;
send_timeout 1000000;
fastcgi_read_timeout 1000000;
}
This has no effect when making a request to example.com/myurlsegment. The timeout occurs after approximately 60 seconds. PHP is configured to allow the script to run until completion (set_time_limit(0))
I don't want to set a global timeout for all scripts.
© Server Fault or respective owner