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