Networking Forums

Networking Forums > Computer Networking > Linux Networking > CLOSE_WAIT issue (Software fails to close connections)

Reply
Thread Tools Display Modes

CLOSE_WAIT issue (Software fails to close connections)

 
 
flarosa
Guest
Posts: n/a

 
      03-19-2008, 10:04 PM
I've got a server application which has a bad habit of failing to
close socket connections after doing web services requests to other
servers. This leaves behind many sockets in the CLOSE_WAIT state.
Eventually (after 3-4 days) the number of sockets in this condition
becomes so large that it exceeds the maximum open files limit.

Unfortunately, the problem is in a third-party library which I cannot
immediately fix.

Is it possible to configure Linux to abandon CLOSE_WAIT sockets after
a timeout period? Is there a reason why the default behavior is no
timeout?

Frank
 
Reply With Quote
 
 
 
 
Rick Jones
Guest
Posts: n/a

 
      03-19-2008, 10:33 PM
flarosa <(E-Mail Removed)> wrote:
> Unfortunately, the problem is in a third-party library which I
> cannot immediately fix.


> Is it possible to configure Linux to abandon CLOSE_WAIT sockets
> after a timeout period? Is there a reason why the default behavior
> is no timeout?


Because absent other information, it is impossible for TCP to tell the
difference between a simplex connection (send only relative to the
CLOSE_WAIT end) and an incomplete connection tear-down.

Anything in the stack that arbitrarily nuked such a connection from
the CLOSE_WAIT end is at best guessing.

Even TCP Keepalives cannot really deal with this since it is likely
there is still a TCP endpoint in FIN_WAIT_2 at the other end.

This will be an excellent test of the third party's responsiveness to
bugreports.

rick jones
--
The glass is neither half-empty nor half-full. The glass has a leak.
The real question is "Can it be patched?"
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Close TCP connections ? wpher56 Windows Networking 3 04-24-2009 07:24 PM
Clearing CLOSE_WAIT connections? newsbot@cox.net Linux Networking 1 08-24-2006 02:44 AM
Close Established Connections From The Command Line לורן שייפר Windows Networking 0 08-04-2005 12:00 PM
Software Installation GPO fails inexplicably Bryan Linton Windows Networking 0 01-18-2005 05:44 PM
Network connections between XP and W98 machines don't always close readily Bruiser Windows Networking 0 10-12-2003 11:43 PM



1 2 3 4 5 6 7 8 9 10 11