upstream server max_fails and fail_timeout question/discussion

Maxim Dounin mdounin at
Sun Oct 3 15:31:08 MSD 2010


On Fri, Oct 01, 2010 at 09:32:00AM -0400, rsawer wrote:


> And here my doubts begin. With 4th,5th,6th, etc requests I thought I
> will be getting 502's unless the 30 minutes fail_timeout will end. And
> instead of that what I see is that Nginx's is resetting the max_fails
> value if all servers in upstream clause have reached the max_fails. 


> What I wanted to ask is if this a proper behaviour? 
> I think that there should be an another configuration parameter which
> would tell nginx what to do in such cases.
> For me it's quite logical that nginx's resets this value, so it can try
> to check if the backend/upstream server is alive, instead of giving
> 502's for 30 minutes fail_timeout, but the world is big, and I think
> there are people that would like Nginx to throw 502's for fail_timeout
> period. What do you think about that ?

There is a little sense in returning 502, and that's why "down due 
to max_fails" status is reset once nginx detects there are no live 

Maxim Dounin

More information about the nginx mailing list