closed connections hanging in time_wait state
Steven Grimm
sgrimm at facebook.com
Sat Dec 1 02:47:52 UTC 2007
Unless your connection rate is very high, old connections in TIME_WAIT
state are nothing to worry about.. TIME_WAIT does not mean the
connections are still open. Here's a page that explains what TIME_WAIT
means (courtesy of a Google search for "tcp time_wait" which will
point you to other explanations if this one doesn't suffice):
http://www.port80software.com/200ok/archive/2004/12/07/205.aspx
-Steve
On Nov 28, 2007, at 12:37 PM, deva seetharam wrote:
> 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