Premature failover to backup upstream

Hello!

I am using Nginx 1.0.5 to reverse proxy to a pool of three upstreams.
One of them is configured as a backup upstream. From time to time, very
rarely, a request will be proxied to the backup upstream when it should
not be. The two normal upstreams are completely healthy, and at
extremely low load.

Why might this be happening?

I see in the documentation
(Module ngx_http_upstream_module) that the upstream
module will shunt to backup if the other upstreams are “down or busy.”
What is the definition of “busy” in this context?

Looking in the debug log, I see many many instances of “http upstream
recv(): -1 (11: Resource temporarily unavailable)”. Is this related?

One thing I haven’t tried is to adjust the max_fails parameter, but
perhaps I should.

Posted at Nginx Forum:

Hi,

Looking in the debug log, I see many many instances of “http upstream
recv(): -1 (11: Resource temporarily unavailable)”. Is this related?

Are you using UNIX sockets? If so, try using TCP sockets, it might help.

Best regards,
Piotr S. < [email protected] >

Are you using UNIX sockets? If so, try using TCP sockets, it might
help.

Is that a configuration option at compile time?

Posted at Nginx Forum:

Oh, I see what you mean. We’re proxying to Tomcat upstreams on separate
hosts, not a local fcgi or anything like that.

So, still looking for some clues.

Posted at Nginx Forum: