Upstream block: backup with max_fails=0 does not appear to work as expected

Jonathan Simowitz simowitz at
Wed May 17 21:05:51 UTC 2017


I have an upstream block with two servers as follows:

upstream {
  server max_fails=0 backup;

My desired use case would be that the server is hit for all
requests and can be marked as down by nginx if it starts serving errors. In
this case nginx will fallback to hitting, however should
not be allowed to be marked down by nginx.

What is actually happening is the "max_fails=0" statement is essentially
being ignored causing the error message "no live upstreams while connecting
to upstream" in my logs.

Is there a configuration here that obtains my desired use case?

Thank you,

Jonathan Simowitz | Jigsaw |  Software Engineer |  simowitz at |
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list