Killing CLOSE_WAIT sockets without killing parent process on Linux
Posted
by
Alex Neth
on Server Fault
See other posts from Server Fault
or by Alex Neth
Published on 2010-11-14T20:47:19Z
Indexed on
2010/12/31
4:55 UTC
Read the original article
Hit count: 287
linux-networking
|sockets
Tomcat is leaving me with CLOSE_WAIT sockets which ultimately saturate the maximum number of connections.
I've tried many methods in my client and server code to get rid of these to no avail, including closing connections, calling System.gc(), etc.
Now I'm trying to find a way to simply time these out quickly in the OS. I've got conntrack working, but am not sure how to use that to kill these connections. I've also set /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_close_wait to 1, which of course is too low but the connections persist.
Is there a way to kill these zombie sockets?
Running Ubuntu.
© Server Fault or respective owner