KeepAlive Not Working as expected for a Reverse Proxy Scenario
Valentin V. Bartenev
ne at vbart.ru
Tue Apr 10 13:03:14 UTC 2012
On Tuesday 10 April 2012 14:53:14 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.
So, what's in the error log? Are you sure that the client doesn't close the
connection? Some browsers actually do after a minute or few.
> tcp_keepalive on;
> tcp_keepcnt 10;
> tcp_keepidle 7200;
> tcp_keepintvl 1m;
There are no such directives in the official nginx distribution. But you can set
SO_KEEPALIVE by parameter of the listen directive:
listen 443 ssl so_keepalive=2h:1m:10;
Please, take a look at the docs: http://nginx.org/r/listen
wbr, Valentin V. Bartenev
More information about the nginx