nginx 99% cpu if upstream server address is ipv6

CoreTex nginx-forum at nginx.us
Sat Jan 14 13:53:00 UTC 2012


Hi,
i have the same problem. any new solutions ?

Regards, Eric

My Setup is:

WORLD -> ( nginx  ipv4 blancer ) -> ( 3 ipv4 webserver )
WORLD -> ( nginx  ipv6 blancer ) -> ( 3 ipv6 webserver )

My Config is:
upstream lb4 {
    server XXX.XXX.XXX.XXX:80;
    server XXX.XXX.XXX.XXX:80;
    server XXX.XXX.XXX.XXX:80;
}
upstream lb6 {
    server [xxxx:xxxx:xxxx::xxxx]:80;
    server [xxxx:xxxx:xxxx::xxxx]:80;
    server [xxxx:xxxx:xxxx::xxxx]:80;
}
server {
    listen  80; ## listen for ipv4
    server_name lb.netsyn.eu;

    access_log  /var/log/nginx/xxx.xxx.eu.access.log;

    location / {
            proxy_pass      http://lb4;
            proxy_redirect  off;
            proxy_next_upstream     error timeout invalid_header
http_500;
            proxy_connect_timeout   2;
            proxy_set_header        Host            $host;
            proxy_set_header        X-Real-IP       $remote_addr;
            proxy_set_header        X-Forwarded-For
$proxy_add_x_forwarded_for;
    }
}

server {
    listen   [::]:80 default ipv6only=on; ## listen for ipv6
    server_name lb.netsyn.eu;

    access_log  /var/log/nginx/xxx.xxxx.eu.access.log;

    location / {
            proxy_pass      http://lb6;
            proxy_redirect  off;
            proxy_next_upstream     error timeout invalid_header
http_500;
            proxy_connect_timeout   2;
            proxy_set_header        Host            $host;
            proxy_set_header        X-Real-IP       $remote_addr;
            proxy_set_header        X-Forwarded-For
$proxy_add_x_forwarded_for;
    }
}

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,208399,221226#msg-221226



More information about the nginx mailing list