Memory leak in outgoing https connections

knyar nginx-forum at
Thu Jul 21 16:44:50 UTC 2011


I believe, there is a memory leak in nginx somewhere in handling
outgoing HTTPS connections. I am using it as a simple http-to-https
proxy. My configuration is the following:

server {
    server_name  localhost;
    access_log  off;
    location / {
            proxy_pass $http_x_proxy_url;

When I try to run something like:
bash -c "while :; do curl -H 'X-Proxy-Url: https://any-https-site.tld/'
http://localhost:81/; done"

I see nginx eating more and more memory with each request.

I used the latest stable version and compiled it from source on Debian
Lenny x64:
root at debian-amd64:/usr/local/nginx/sbin# ./nginx -V
nginx: nginx version: nginx/1.0.5
nginx: built by gcc 4.3.4 (Debian 4.3.4-6~bpo50+1) 
nginx: TLS SNI support enabled
nginx: configure arguments: --with-debug --with-http_stub_status_module
--with-http_flv_module --with-http_ssl_module --with-http_dav_module

Best regards,

Posted at Nginx Forum:,212769,212769#msg-212769

More information about the nginx mailing list