is proxy_read_timeout effects for a slow response?
Francis Daly
francis at daoine.org
Thu Aug 17 19:54:10 UTC 2017
On Tue, Aug 15, 2017 at 05:47:23AM -0400, foxgab wrote:
Hi there,
> if nginx connect to a proxied server successfully, but the server takes a
> long time before starting to send the response, will proxy_read_timeout
> directive effect? if not, is there any other directive do that timeout kind
> work?
The documentation at http://nginx.org/r/proxy_read_timeout suggests "yes".
A quick test indicates that it does:
In one shell, a listener that will be slow to respond:
nc -l 127.0.0.1:10880
nginx.conf:
server {
location / {
proxy_read_timeout 6;
proxy_pass http://127.0.0.1:10880;
}
}
Test command:
date; curl -v http://127.0.0.1/test; date
I get a http response after 6 seconds.
> when proxy_next_upstream is set to "off", which status code will be respond
> if timeout?
"Gateway Timeout" is 504.
f
--
Francis Daly francis at daoine.org
More information about the nginx
mailing list