httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Meyer <>
Subject Re: Doing left-over request processing at startup....
Date Wed, 29 Dec 2010 08:52:30 GMT
On Tue, 28 Dec 2010 12:37:39 -0800
Brian McQueen <> wrote:

> What I was imaging is all requests going through that same queue and
> some daemon works the queue all the time.  The httpd is one interface
> to the queue.  So there is no such hook required. Just start up the
> queue drainer and start the httpd. Spikes won't take down the site.
> Its a good design.

How do you get the queue to handle the normal case (I'm dealing with
failure cases here), where the client sends a request to the proxy,
which forwards it to the back end, gets the response, and then sends
that back to the client and gets an acknowledgment? If the queue can
talk to the client, then the apache proxy isn't doing anything useful,
is it? If the queue can't talk to the client, then handing it a
request means the request has to fail, so it should only get involved
in failed requests.

Which once again brings us back to the original question: some apache
process died in the middle of handling a request, so it needs to be
handed to the queue to reverse, and this gets discovered at apache
startup time. I can certainly arrange the system to start the queue
handler before apache boots, but I still need a place in the startup
processing after checking the state file to hand things off to the

Come to think of it, I'm not sure this problem can be avoided if
there's an apache module doing the work of insuring success or
reversal at all: if the module dies before a request is finished (one
way or the other) and apache is shut down before it's dealt with, then
it's going to get found at startup time and we're back to that
question. But the point of the module is to do the success/reversal

The current code actually works fine - except for this timing
issue. If I kill apache in the middle of handling a reversal, and
restart it, the first connection will cause the unfinished reversal to
be finished. I'm trying to find some way to make this happen at
startup, instead of on the first connection.

Mike Meyer <>
Independent Network/Unix/Perforce consultant, email for more information.

O< ascii ribbon campaign - stop html mail -

View raw message