You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jim Jagielski <ji...@jaguNET.com> on 1997/01/28 13:51:03 UTC

lingering_close notes

I've got an A/UX box, which has "always" used NO_LINGCLOSE now
running with SO_LINGER as a test... No disasters, but it reallt
doesn't get that much of a workout.

By mistake, I compiled Apache with just USE_SO_LINGER defined. This
meant, of course, that Apache was using both kernel and user-level
"lingering". Took down one server is <12 hours although it didn't
look like a overload of FIN_WAIT_2 states... Fluke? Who knows.
I would like to add logic that if SO_LINGER is defined, we also
define NO_LINGCLOSE automatically.

Finally, as we all know, even though an OS "supports" SO_LINGER,
if based on old BSD sockets, the timeval is ignored unless it's
0. So we'll need to keep that in mind as well. infinate is a long
time to block :)

Generally, using lingering_close still results in more FIN_WAIT_2
states than without it (40 to 10, on average on some medium-loaded
servers here). Could there be an interaction between using
SO_KEEPALIVE and lingering close? Some default timers for SO_KEEPALIVE
are very long and we may be coming against some shutdown interaction
with a socket that the kernel is trying to keep open :/

-- 
====================================================================
      Jim Jagielski            |       jaguNET Access Services
     jim@jaguNET.com           |       http://www.jaguNET.com/
                  "Not the Craw... the CRAW!"