is proxy_read_timeout effects for a slow response?

Francis Daly francis at
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 suggests "yes".

A quick test indicates that it does:

In one shell, a listener that will be slow to respond:

  nc -l


  server {
    location / {
      proxy_read_timeout 6;

Test command:

  date; curl -v; 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.

Francis Daly        francis at

More information about the nginx mailing list