atom feed9 messages in ru.sysoev.nginxRe: nginx keep using more and more me...
FromSent OnAttachments
ngin...@serverphorums.comJan 17, 2012 10:00 am 
Delta YehJan 18, 2012 1:26 am 
Valentin V. BartenevJan 18, 2012 1:59 am 
Valentin V. BartenevJan 18, 2012 2:17 am 
Maxim DouninJan 18, 2012 2:31 am 
Saqib RasulJan 18, 2012 2:56 am 
Saqib RasulJan 18, 2012 4:32 am 
Valentin V. BartenevJan 18, 2012 4:51 am 
Saqib RasulJan 18, 2012 2:05 pm 
Subject:Re: nginx keep using more and more memory
From:Delta Yeh (delt@gmail.com)
Date:Jan 18, 2012 1:26:38 am
List:ru.sysoev.nginx

nginx use memory pool for each http request. If the request is never-ending, more and more memory will be allocated.

2012/1/18 <ngin@serverphorums.com>:

Hi,

We are using nginx to proxy to 4 back end servers. And we terminate SSL at
nginx. We use nginx in a somewhat special way in that we make 1 HTTP GET and the
back-end servers give a very very long (essentially never-ending) response.

trouble is that i notice that the nginx worker processes keep using up more and
more memory. When the connections to nginx terminate, everything seems to be
cleaned up and the memory usage of the worker processes drops to normal.

my ssl config looks like this:

# HTTPS server    server {        server_name  myserver;        listen       myserver:4443;        ssl on;

       ssl_certificate      /myserver.pem;        ssl_certificate_key  /myserver.pem;

       proxy_ssl_session_reuse off;

       ssl_protocols  SSLv3 TLSv1;        ssl_ciphers  HIGH:!ADH:!MD5;        ssl_prefer_server_ciphers   on;

       proxy_buffering off;

       location / {            root   /www/server/html;            index  index.html index.htm;        }

       location /SERVER_1/ {            rewrite /SERVER_1/(.*) /$1 break;            proxy_set_header  X-Real-IP  $remote_addr;            proxy_pass http://localhost:8080;        } }

i am running nginx/1.0.11

I can reproduce the problem each time with a test setup of:

1 nginx and a special servlet that only dishes out a constant stream of
serialized java objects. If you are interested, i can provide also this servlet.
then using about 50 long-running HTTP GETs (simulating 100 clients), i can
always get more memory usage in nginx.

does anyone know if i misconfigured my nginx?