# Proxy\_next\_upstream\_timeout behavior

**URL:** <https://www.ruby-forum.com/t/proxy-next-upstream-timeout-behavior/244393>\
**Category:** NGINX\
**Created:** [April 1, 2016, 5:44pm UTC](https://www.ruby-forum.com/t/proxy-next-upstream-timeout-behavior/244393 "2016-04-01T17:44:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [April 1, 2016, 5:44pm UTC](https://www.ruby-forum.com/t/proxy-next-upstream-timeout-behavior/244393/1 "2016-04-01T17:44:43Z")

</div>

Hi,

If I set proxy\_next\_upstream\_timeout to 50 second, will nginx break the  
current upstream connection at 50 second and fail the request? Or will  
it  
wait until current one finishes (or read timeout) then decide whether it  
should try next upstream and find out it is already more than 50 so fail  
the request?

Thanks!  
Frank

---

<div class="post-metadata">

**Author:** ![fjlj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/e79b87/32.png) [@fjlj](https://www.ruby-forum.com/u/fjlj)\
**Post date:** [April 4, 2016, 4:01pm UTC](https://www.ruby-forum.com/t/proxy-next-upstream-timeout-behavior/244393/2 "2016-04-04T16:01:10Z")

</div>

Hello!

On Fri, Apr 01, 2016 at 08:43:56AM -0700, Frank L. wrote:

> If I set proxy\_next\_upstream\_timeout to 50 second, will nginx break the  
> current upstream connection at 50 second and fail the request?

No.

> Or will it  
> wait until current one finishes (or read timeout) then decide whether it  
> should try next upstream and find out it is already more than 50 so fail  
> the request?

Yes.

The proxy\_next\_upstream\_timeout directive only sets the time period  
during which the proxy\_next\_upstream directive is allowed to work. It  
does nothing else, and won’t anyhow influence current upstream  
connection.

–  
Maxim D.

> **[nginx](http://nginx.org/)**
