Welcome! Log In Create A New Profile

Advanced

upstream keepalive debugging

September 03, 2013 08:44AM
Hi
I seem to have an issue where the upstream keepalives aren't being re-used

proxy_http_version 1.1;

upstream dev1 {
server 10.0.0.11 max_fails=0;
keepalive 1024;
}

location /
{
proxy_pass http://dev1;
proxy_set_header Connection "";
}

On a separate server I run 'ab -n 500 -c 500
http://10.0.0.10/test/blah.txt' ... a few times waiting say 10 seconds
between runs

on the main server I can do netstat between runs, here's the results:

root@dev0:/root # netstat -n | grep "10.0.0.11.80" | grep "ESTAB" | wc -l
2
root@dev0:/root # netstat -n | grep "10.0.0.11.80" | grep "ESTAB" | wc -l
260
root@dev0:/root # netstat -n | grep "10.0.0.11.80" | grep "ESTAB" | wc -l
758
root@dev0:/root # netstat -n | grep "10.0.0.11.80" | grep "ESTAB" | wc -l
950
root@dev0:/root # netstat -n | grep "10.0.0.11.80" | grep "ESTAB" | wc -l
1308
root@dev0:/root # netstat -n | grep "10.0.0.11.80" | grep "ESTAB" | wc -l
1748
root@dev0:/root # netstat -n | grep "10.0.0.11.80" | grep "ESTAB" | wc -l
1992
root@dev0:/root # netstat -n | grep "10.0.0.11.80" | grep "ESTAB" | wc -l
2316
root@dev0:/root # netstat -n | grep "10.0.0.11.80" | grep "ESTAB" | wc -l
2767
root@dev0:/root # netstat -n | grep "10.0.0.11.80" | grep "ESTAB" | wc -l
3063
root@dev0:/root # netstat -n | grep "10.0.0.11.80" | grep "ESTAB" | wc -l
3392
root@dev0:/root # netstat -n | grep "10.0.0.11.80" | grep "ESTAB" | wc -l
3491
root@dev0:/root # netstat -n | grep "10.0.0.11.80" | grep "ESTAB" | wc -l
3787

It shouldn't ever need more than 500 connections to the upstream, but it
keeps making more? and doesn't stick to the 1024 limit....
What's going on?

nginx/1.4.1 / FreeBSD 9.1




_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

upstream keepalive debugging

dbradfield September 03, 2013 08:44AM

Re: upstream keepalive debugging

dbradfield September 03, 2013 09:20AM

Re: upstream keepalive debugging

Maxim Dounin September 03, 2013 09:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 278
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