On Sun, 01 Sep 2002 19:00:49 +0300
Shachar Shemesh <[EMAIL PROTECTED]> wrote:

> >>2. What measures can I take to prevent them to appear ?
> >>
> For all practical purposes, nothing. They are necessary. You can make 
> sure you never close the connection first ;-). If the connection was 
> closed using a RST instead of a FIN, that would not happen, but I know 
> of little non-priveleged user mode ways of doing that (mostly - killing 
> the app that held the socket would do that, but I doubt this is what you 
> want).
> 

Everybody on the Net keeps telling me that they are nessessary. I have a
client/server utility, both sides are at my control. It works for some
two-three weeks and then computer flooded with CLOSE_WAITS, I can not open
more sockets and have to restart application (or reboot computer). I'm using
every recommended techniques from Stevens book - shutdown, linger, SO_REUSEADDR
etc... without any success. Can it be some kernel bug ? I can never reproduce
this situation manually but it happens quite frequently. And it is very
frustrating. There are plenty Linux Internet applications (Apache for example)
that supposed to work 24/7/365. How do they handle this problem ?


> >>3. Why can't I release them from outside with some utility ?
> >>
> You can try a packet generator to send a RST to the connection. I doubt 
> that is worth it, though.

Can you be more detailed ? You mean, I have to get from 'netstat' port that
socket in CLOSE_WAIT state is listening to, somehow guess TCP sequence numbers
and send ACK+FIN there ?

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to