httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ed Korthof ...@bitmechanic.com>
Subject Re: interesting scoreboard problem...
Date Tue, 11 Aug 1998 05:03:46 GMT
On Mon, 10 Aug 1998, Brian Behlendorf wrote:

> At 07:20 PM 8/7/98 -0400, Jim Jagielski wrote:
> >Yeah... this is due to the timing since the status is updated before
> >the rest of the fields are:
> >
> >	1. set status to R
> >	2. Read Request
> >	3. Update all other fields one we have the full request
> 
> So to be pedantic we should insert a "1.5: clear other status variables",
> IMHO.

I'd imagine that it was done without this step for efficiency... one could
change mod_status to report empty fields except when the child is actually
processing a request or waiting for another (in keepalive), and that would
accomplish much the same result, no? 

>From a brief look at the source code, it appears that as soon as a request
has been read, the server goes to SERVER_BUSY_WRITE; and then to
SERVER_BUSY_KEEPALIVE; and then either back to SERVER_BUSY_WRITE or
SERVER_READY, depending on whether or not another request comes in.  And
SERVER_BUSY_DNS can occur, almost always when the request has been read
and the scoreboard has valid data... (the one exception I found was when
ap_get_remote_host is called after an error while reading the request --
this is minor enough not to matter too much IMO).  So those three states
ought to cover the times when the scoreboard will have valid data about
the current request... 

(My understanding of Apache's internal states is somewhat out of date, so
someone who knows 1.3 better than I should really verify the statements
above -- to be conservative, one could simply have mod_status report empty
fields while in SERVER_BUSY_READ, but doing it the other way seems more
elegant to me... SERVER_DEAD is already treated as a special case in this 
way...)

Ed, who is often impressed with what he reads on this list


Mime
View raw message