11 messages in ru.sysoev.nginxRe: lots of connections on TIME_WAIT ...
FromSent OnAttachments
Deepan ChakravarthyApr 7, 2009 7:44 am 
Anoop AliasApr 7, 2009 7:59 am 
Jérôme LoyetApr 7, 2009 8:07 am 
Kon WilmsApr 7, 2009 9:06 am 
Artis CauneApr 8, 2009 12:46 am 
Igor SysoevApr 8, 2009 1:09 am 
Anıl ÇetinApr 8, 2009 7:56 am 
Maxim DouninApr 8, 2009 8:40 am 
Anıl ÇetinApr 8, 2009 9:51 am 
Peter LanghansApr 8, 2009 10:10 am 
Anıl ÇetinApr 9, 2009 2:16 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: lots of connections on TIME_WAIT stateActions...
From:Artis Caune (arti@gmail.com)
Date:Apr 8, 2009 12:46:53 am
List:ru.sysoev.nginx

2009/4/7 Deepan Chakravarthy <code@gmail.com>:

Hi,   I am using nginx with fast-cgi .  When I run $netstat -np | grep 127.0.0.1:9000 I find lot of connections in TIME_WAIT state. Is this because of high keepalive_timeout value ?   When lot of people use (5 requests per second)  nginx takes more  time to respond. System load goes more than 10 during peak hours.

This is because of how TCP works.

debian:~# netstat -np | grep 127.0.0.1:9000 tcp        0      0 127.0.0.1:9000          127.0.0.1:45603 TIME_WAIT  - tcp        0      0 127.0.0.1:9000          127.0.0.1:45601 TIME_WAIT  -

If you were on FreeBSD, you could disable TIME_WAIT on loopback completely by setting:

sysctl net.inet.tcp.nolocaltimewait=1

Maybe debian has similar /proc tuning or you can try to decrease msl (maximum segment lifetime) or beter don't use inet sockets on loopback - use unix sockets.

<----. CCNA | BSDA <----|==================== <----' didii FreeBSD