From: "Bill Stoddard" <[EMAIL PROTECTED]>
Sent: Thursday, November 15, 2001 11:50 AM
> >
> > You can demonstrate (interactively) by quering server-status against 1.3.22,
> > with keepalives on. As you restart, keep refreshing. The two servers will
> > (alternating randomly) answer the status request, as indicated by uptime.
>
> Nope, not possible (at least for the reasons you suspect). I suspect your browser is
> opening multiple connections the server and is sending the server-status requests
>randomly
> on different connections. Once a process starts shutting down, it stops accepting new
> connections before allowing the new process to begin accepting connections (via the
> start_mutex). There is no way for stock Apache 1.3 to accept connections on the
>process
> shutting down and the new process simultaniously.
Uhmm... here's demonstration test number one, start this test, restart after inititing
the test;
#!perl
#the /cgi-bin/spiffy.pl script, to test that POST content is recieved complete
binmode STDIN;
$l = 0;
while (<STDIN>) {
$l += length($_);
}
if ( $l == $ENV{"CONTENT_LENGTH"} ) {
print "Status: 200 OK\n";
} else {
print "Status: 500 BADLENGTH!\n";
}
print "content-type:text/plain\n\n";
print "Bytes read $l\n";
print "Bytes expected $ENV{'CONTENT_LENGTH'}\n";
ab -k -n 100 -p somefile -c 10 http://localhost:8080/cgi-bin/spiffy.pl
Under 1.3.22, I loose an average of 3 connections (somefile is a bit over 1MB).
I'm reasonably convinced my earlier observations were an artifact of multiple
keep-alive
sockets, as you suggest. We have a similar number of connection errors (about 2 or 3)
with both pre and post my patch, but with my patch we have about 5 length errors,
which
didn't occur in 1.3.22, so I'll accept that this is the wrong patch.
> The old process may be still servicing keep-alive connections however. I'm positive
>there
> is code in 1.3.* to quit handling keep alive connections if the process is shutting
>down.
> I'll take a look and see if that code is broken.
Agreed, if we resolve that, most observations of this artifact will disappear, and the
time-to-restart-completion should drop.
Bill