Need more details about max_fails and fail_timeout

Anton Yuzhaninov citrin at
Wed Feb 18 23:13:06 MSK 2009

Sun Yijiang wrote:
> I'm new to nginx, spent a morning reading nginx documentation.  I'm 
> still not clear how nginx determines the status of upstream servers.  
> Let's say we have some upstream servers, all set to max_fails=3 and 
> fail_timeout=30s.  According to the document, if one server fails 3 
> times within 30s time, nginx will mark this server to be inoperative and 
> won't direct any request to it.  Is that right?


>  Then the question is: 
> will nginx try this server again later to see if it recovers?

Yes, it will try to send requests after fail_timeout.

So fail_timeout used twice - errors counted for fail_timeout, and upstream marked as dead for

  Anton Yuzhaninov

More information about the nginx mailing list