nginx keep using more and more memory

Delta Yeh delta.yeh at gmail.com
Wed Jan 18 09:27:01 UTC 2012


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

2012/1/18  <nginxlist at 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?
>
> ---
> posted at http://www.serverphorums.com
> http://www.serverphorums.com/read.php?5,431797,431797#msg-431797
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx



More information about the nginx mailing list