Thanks Valentin, but it still is not accepting the parameters:-<br><br>[root@api1.nos2 conf]# /etc/init.d/nginxfromsrc start<br>Starting nginx: nginx: [emerg] invalid parameter "so_keepalive=2h:1m:10" in /usr/local/nginx-1.0.14/conf/nginx.conf:                                        96<br>

<br>Secondly, I don't see the message that the client is terminating the connections.<br>In case I use elinks to open the URL and close it, it displays me that the KeepAlive connection is terminated by the client.<br>

So, I am pretty sure that the connections are not terminated by the client.<br><br>Additionally, we are using CURL library to check it.<br>We have a simulator that create the connections and sends data using CURL library.<br>

The same scenario is working fine with Apache and the connections are persistent.<br><br><br><div class="gmail_quote">On Tue, Apr 10, 2012 at 4:23 PM, Rajnesh Kumar Siwal <span dir="ltr"><<a href="mailto:rajnesh.siwal@gmail.com">rajnesh.siwal@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, <br><br>The KeepAlive Timeout is set to 2 hours, but we can see that the connections start terminating after a few minutes.<br>

The KeepAlive module does not seems to be behaving as expected.<br>The connections are created on port :343.<br>
The configuration file nginx.conf is :-<br>-------------------------------------------------------------------<br>user              nginx;<br>worker_processes  16;<br>error_log  /var/log/nginx/error.log info;<br>pid        /var/run/nginx.pid;<br>


events {<br>        #worker_connections  16192;<br>        #worker_connections  161920;<br>        worker_connections  40960;<br>        use epoll;<br>        multi_accept on;<br>}<br>http {<br>    include       /etc/nginx/mime.types;<br>


    default_type  application/octet-stream;<br>    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '<br>                      '$status $body_bytes_sent "$http_referer" '<br>


                      '"$http_user_agent" "$http_x_forwarded_for"';<br>    access_log  /var/log/nginx/access.log  main;<br>    sendfile        on;<br>    #tcp_nopush     on;<br>    keepalive_timeout  7200 7200;<br>


tcp_keepalive on;<br>tcp_keepcnt 10;<br>tcp_keepidle 3600;<br>tcp_keepintvl 1m;<br>    #gzip  on;<br><br>    #<br>    # The default server<br>    #<br>        server {<br>                listen 4443;<br>                server_name _;<br>


                location /nginx_status {<br>  # copied from <a href="http://blog.kovyrin.net/2006/04/29/monitoring-nginx-with-rrdtool/" target="_blank">http://blog.kovyrin.net/2006/04/29/monitoring-nginx-with-rrdtool/</a><br>

                stub_status on;<br>
                access_log   off;<br>                }<br>        }<br>    server {<br>        listen       80;<br>        server_name  _;<br>    #   keepalive_timeout  7200 7200;<br>        #charset koi8-r;<br>        access_log  logs/host.access.log  main;<br>


        location / {<br>                proxy_pass      <a href="http://172.31.253.50:180/" target="_blank">http://172.31.253.50:180/</a>;<br>                include         /etc/nginx/proxy.conf;<br>        }<br>        }<br>

        server {<br>
        listen 443 ssl;<br>        ssl on;<br>        ssl_verify_client on;<br>        server_name _;<br>        ssl_certificate      /home/rsiwal/cps.chargepoint.net.crt;<br>        #ssl_client_certificate  /etc/httpd/certs/<a href="http://chargepoint.net/server/certs/cps.chargepoint.net.crt" target="_blank">chargepoint.net/server/certs/cps.chargepoint.net.crt</a>;<br>


        ssl_client_certificate  /home/rsiwal/chargepoint.net.crt;<br>        ssl_certificate_key  /home/rsiwal/cps.chargepoint.net.pem;<br>        location / {<br>                 proxy_pass      <a href="http://172.31.253.50:1443/" target="_blank">http://172.31.253.50:1443/</a>;<br>


                include         /etc/nginx/proxy.conf;<br>        }<br>        }<br>        server {<br>        listen 343 ssl;<br>        ssl on;<br>        ssl_verify_client on;<br>        server_name _;<br>        #ssl_session_cache shared:SSL:40m;    # Works fine upto 15K<br>


        ssl_session_cache shared:SSL:70m;<br>        #######ssl_session_timeout 5m;     #<br>        ssl_session_timeout 120m;      #<br>tcp_keepalive on;<br>tcp_keepcnt 10;<br>tcp_keepidle 7200;<br>tcp_keepintvl 1m;<br>

        access_log      logs/ssl-access.log main;<br>
        error_log       logs/ssl-error.log debug;<br>        keepalive_requests    10000;<br>        #keepalive_disable none<br>        sendfile on;<br>        tcp_nopush on;<br>        tcp_nodelay on;<br>        client_header_timeout 300;<br>


        client_body_timeout 300;<br>        ssl_certificate      /home/rsiwal/cps.chargepoint.net.crt;<br>        ssl_certificate_key  /home/rsiwal/cps.chargepoint.net.pem;<br>        ssl_client_certificate  /home/rsiwal/chargepoint.net.crt;<br>


        location / {<br>                 proxy_pass      <a href="http://172.31.253.50:1343/" target="_blank">http://172.31.253.50:1343/</a>;<br>                include         /etc/nginx/proxy.conf;<br>        }<br>        }<br>

    include /etc/nginx/conf.d/*.conf;<br>
}<br>-----------------------------------------------------------------------------------------------------------------------------<br><br>Thanks in advance<span class="HOEnZb"><font color="#888888"><br clear="all"><br>-- <br>

Regards,<br>Rajnesh Kumar Siwal<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Rajnesh Kumar Siwal<br>+919818183024<br>