This is a discussion on CLOSE_WAIT issue (Software fails to close connections) within the Linux Networking forums, part of the Linux Forums category; I've got a server application which has a bad habit of failing to close socket connections after doing web ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
flarosa <frank@franklarosa.com> 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... |
![]() |
| Thread Tools | |
| Display Modes | |
|
|