Upstream failures against Mongrels instances

Alexander Staubo alex at
Mon Aug 13 14:52:28 MSD 2007

We are running Nginx against a bunch of Mongrel instances. We kill and
respawn these fairly frequently (in order to avoid some nasty
third-party library memory leaks that we have not been able to hunt
down), and these restarts seem to coincide with upstream errors in

2007/08/13 12:45:32 [error] 16165#0: *347414 upstream timed out (110:
Connection timed out) while reading response header from upstream ...

I have set the proxy to pick another upstream on errors -- which
should work as the restarting is staggered to make sure some instances
are always available -- but this seems to have no effect:

  proxy_next_upstream error timeout http_500 invalid_header

Looks to me like Nginx may be trying to use the TCP connections to the
Mongrel instances that have terminated, and doesn't immediately create
a new connection when the old one fails.

This is Nginx 0.4.13-3, Ubuntu's current stable version.


More information about the nginx mailing list