KeepAlive Not Working as expected for a Reverse Proxy Scenario

Maxim Dounin mdounin at
Tue Apr 10 13:03:03 UTC 2012


On Tue, Apr 10, 2012 at 04:23:14PM +0530, Rajnesh Kumar Siwal wrote:

> The KeepAlive Timeout is set to 2 hours, but we can see that the
> connections start terminating after a few minutes.
> The KeepAlive module does not seems to be behaving as expected.
> The connections are created on port :343.
> The configuration file nginx.conf is :-


>     keepalive_timeout  7200 7200;

How do you test?

Note: many (most?) browsers won't keep connections open for such a 
long time and will close them after a minute or so.  E.g. Chrome 
unconditionally closes connections after 5 minutes.

Note well: nginx itself might close keepalive connections before 
timeout passes if it's short on worker_connections.  Though I 
suppose you are hitting browsers behaviour instead.

Maxim Dounin

More information about the nginx mailing list