closed connections hanging in time_wait state

deva seetharam devs at usa.net
Wed Nov 28 20:37:41 UTC 2007


hello
we are using python memcache (ver. 1.4.0)  with memcached version  
(1.2.2) in a web application with apache2 running on debian 4.0.

we notice that when we call disconnect_all() to close connections, the  
connections are not actually closed - they are left hanging in  
TCP_WAIT state.


i have included below a few of the lines i got from netstat -nt | grep  
-i 11211.

is there anything we can do close the connections properly?

thanks
dave

tcp        0      0 127.0.0.1:45965         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:45964         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:46001         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:46000         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:46006         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:46004         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:46011         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:46009         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:46008         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:46015         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:46014         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:45987         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:45991         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:45990         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:45995         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:45994         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:45993         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:45992         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:45999         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:45998         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:45997         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:45996         127.0.0.1:11211          
TIME_WAIT
tcp        0      0 127.0.0.1:11211         127.0.0.1:46063          
ESTABLISHED



More information about the memcached mailing list