Welcome! Log In Create A New Profile

Advanced

Re: KeepAlive Not Working as expected for a Reverse Proxy Scenario

Rajnesh Kumar Siwal
April 11, 2012 01:42AM
Thanks Valentin, but it still is not accepting the parameters:-

[root@api1.nos2 conf]# /etc/init.d/nginxfromsrc start
Starting nginx: nginx: [emerg] invalid parameter "so_keepalive=2h:1m:10" in
/usr/local/nginx-1.0.14/conf/nginx.conf:
96

Secondly, I don't see the message that the client is terminating the
connections.
In case I use elinks to open the URL and close it, it displays me that the
KeepAlive connection is terminated by the client.
So, I am pretty sure that the connections are not terminated by the client.

Additionally, we are using CURL library to check it.
We have a simulator that create the connections and sends data using CURL
library.
The same scenario is working fine with Apache and the connections are
persistent.


On Tue, Apr 10, 2012 at 4:23 PM, Rajnesh Kumar Siwal <
rajnesh.siwal@gmail.com> wrote:

> Hi,
>
> 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 :-
> -------------------------------------------------------------------
> user nginx;
> worker_processes 16;
> error_log /var/log/nginx/error.log info;
> pid /var/run/nginx.pid;
> events {
> #worker_connections 16192;
> #worker_connections 161920;
> worker_connections 40960;
> use epoll;
> multi_accept on;
> }
> http {
> include /etc/nginx/mime.types;
> default_type application/octet-stream;
> log_format main '$remote_addr - $remote_user [$time_local]
> "$request" '
> '$status $body_bytes_sent "$http_referer" '
> '"$http_user_agent" "$http_x_forwarded_for"';
> access_log /var/log/nginx/access.log main;
> sendfile on;
> #tcp_nopush on;
> keepalive_timeout 7200 7200;
> tcp_keepalive on;
> tcp_keepcnt 10;
> tcp_keepidle 3600;
> tcp_keepintvl 1m;
> #gzip on;
>
> #
> # The default server
> #
> server {
> listen 4443;
> server_name _;
> location /nginx_status {
> # copied from
> http://blog.kovyrin.net/2006/04/29/monitoring-nginx-with-rrdtool/
> stub_status on;
> access_log off;
> }
> }
> server {
> listen 80;
> server_name _;
> # keepalive_timeout 7200 7200;
> #charset koi8-r;
> access_log logs/host.access.log main;
> location / {
> proxy_pass http://172.31.253.50:180/;
> include /etc/nginx/proxy.conf;
> }
> }
> server {
> listen 443 ssl;
> ssl on;
> ssl_verify_client on;
> server_name _;
> ssl_certificate /home/rsiwal/cps.chargepoint.net.crt;
> #ssl_client_certificate /etc/httpd/certs/
> chargepoint.net/server/certs/cps.chargepoint.net.crt;
> ssl_client_certificate /home/rsiwal/chargepoint.net.crt;
> ssl_certificate_key /home/rsiwal/cps.chargepoint.net.pem;
> location / {
> proxy_pass http://172.31.253.50:1443/;
> include /etc/nginx/proxy.conf;
> }
> }
> server {
> listen 343 ssl;
> ssl on;
> ssl_verify_client on;
> server_name _;
> #ssl_session_cache shared:SSL:40m; # Works fine upto 15K
> ssl_session_cache shared:SSL:70m;
> #######ssl_session_timeout 5m; #
> ssl_session_timeout 120m; #
> tcp_keepalive on;
> tcp_keepcnt 10;
> tcp_keepidle 7200;
> tcp_keepintvl 1m;
> access_log logs/ssl-access.log main;
> error_log logs/ssl-error.log debug;
> keepalive_requests 10000;
> #keepalive_disable none
> sendfile on;
> tcp_nopush on;
> tcp_nodelay on;
> client_header_timeout 300;
> client_body_timeout 300;
> ssl_certificate /home/rsiwal/cps.chargepoint.net.crt;
> ssl_certificate_key /home/rsiwal/cps.chargepoint.net.pem;
> ssl_client_certificate /home/rsiwal/chargepoint.net.crt;
> location / {
> proxy_pass http://172.31.253.50:1343/;
> include /etc/nginx/proxy.conf;
> }
> }
> include /etc/nginx/conf.d/*.conf;
> }
>
> -----------------------------------------------------------------------------------------------------------------------------
>
> Thanks in advance
>
> --
> Regards,
> Rajnesh Kumar Siwal
>



--
Regards,
Rajnesh Kumar Siwal
+919818183024
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

KeepAlive Not Working as expected for a Reverse Proxy Scenario

Rajnesh Kumar Siwal April 10, 2012 06:54AM

Re: KeepAlive Not Working as expected for a Reverse Proxy Scenario

Maxim Dounin April 10, 2012 09:04AM

Re: KeepAlive Not Working as expected for a Reverse Proxy Scenario

Valentin V. Bartenev April 10, 2012 09:04AM

Re: KeepAlive Not Working as expected for a Reverse Proxy Scenario

Rajnesh Kumar Siwal April 11, 2012 01:42AM

Re: KeepAlive Not Working as expected for a Reverse Proxy Scenario

Valentin V. Bartenev April 11, 2012 07:06AM

Re: KeepAlive Not Working as expected for a Reverse Proxy Scenario

Rajnesh Kumar Siwal April 12, 2012 03:02PM

Re: KeepAlive Not Working as expected for a Reverse Proxy Scenario

Valentin V. Bartenev April 12, 2012 03:38PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 265
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready