On 12/12/07, Daniel Ouellet <[EMAIL PROTECTED]> wrote: > knitti wrote: > > HTTP keep alives have nothing to do with it. If the socket is in > > CLOSE_WAIT, the TCP connection can't be reused, the server > > has sent its FIN and the client its FIN/ACK, but the server doesn't > > have yet sent its final ACK. > > Well actually it does under normal operation. See, if you get a > connection from a user and have keep alive setup. The socket will stay > open to speed up the next request from the same users without having to > establish a new connection, reusing the same socket for speed, but at > the same time keeping that socket open and not ready to close yet for > the next users. So, you see, if you have longer keep alive setup in > httpd, you will reach the CLOSE_WAIT later on instead of sooner if you > have shorter keep alive setup. See what I explain, may be not as well as > I would like is the impact of PF and httpd together as well as the > net.inet.tcp.xxx in sysctl setup. They all interact together in some > ways and as such I also said it wasn't something to take isolated of one > an other. [...] > I think the CLOSE_WAIT state and time is a function of the OS stack, not > the application itself, in this case httpd. I could be wrong here and I > would love for someone to correct that for me if I do not understand > that properly. But my understanding is this is control by the OS, not > the application itself, other then the keep alive obviously in this case. >
you tell me that there is some correlation between HTTP keep alives and a socket ending up in CLOSE_WAIT for some time. That is the practical observation. But I'm interested in whether this is by design or not. RFC 2616 doesn't mention implementation details, and I can't see why the socket implementation (OS) would want to keep a socket in CLOSE_WAIT for some time (not sending a final ACK). > > btw: I might be going off topic here, but I think it applies to > > OpenBSDs httpd. I won't sent any further mail to this thread > > you tell me to shut up. > > I didn't do such thing. The original poster however should/may take the > advice, or drop it. (;> sorry for the confusion, I forgot to write an "if" after "thread" --knitti