<div dir="ltr"><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">Those directives works at very different levels.<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)"><br><a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream_timeout" target="_blank">proxy_next_upstream_timeout</a> allocates a time for nginx to find a proper upstream (configured with <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream" target="_blank">proxy_next_upstream</a>).<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">By default, there is no limit, making nginx attempting every upstream one after the other until finding one healthy or running out of valid upstreams, which could take a while (maybe even an infinite time with health checks? Speculating here).<br><br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)"><a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout" target="_blank">proxy_read_timeout</a> sets a timer 'between two read operations', say the docs, which is closer to your question.<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">Those are to be defined, but I suppose that when there is nothing more to read in the buffer awaiting backend response, and the response is not complete, this timer kicks in and effectively close the connection, returning an error.<br></div><div class="gmail_extra"><br><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">They are not working at the same level at all: there is no way to mistake one for the other.</div><div><div><font size="1"><span style="color:rgb(102,102,102)">---<br></span><b><span style="color:rgb(102,102,102)">B. R.</span></b><span style="color:rgb(102,102,102)"></span></font></div></div>
<br><div class="gmail_quote">On Tue, Mar 29, 2016 at 5:03 PM, Frank Liu <span dir="ltr"><<a href="mailto:gfrankliu@gmail.com" target="_blank">gfrankliu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<div><br></div><div>If you set read timeout 2 min and next upstream timeout 50 seconds, will nginx break the current connection at 50 second or will it let the read finish until 2min?</div><div><br></div><div>Thanks</div><span><font color="#888888"><div>Frank</div>
</font></span><br>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br></blockquote></div><br></div></div>