httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Ames <>
Subject Re: [users@httpd] Asynchronous page creation?
Date Fri, 15 Oct 2004 15:24:20 GMT

If I understand what you want to do, I've done a little like that with 
modifications mostly to the worker MPM for httpd-2.1.  The patch is here - .

But I was primarily interested in low hanging fruit - threads that are between 
HTTP requests.  I picked them because they don't need a lot of state information 
to be saved and restored when the connection changes threads, and because we 
often see a lot of threads tied up in keepalive timeouts and lingering close 

If you want to exit a thread while it is executing a handler which is doing 
database calls, there will be a lot more state that needs to move between 
threads.  But maybe this will give you a start.

Good luck,

p.s. disclaimer - the event.patch has some known issues posted at

Craig S wrote:
> After digging into the code (nice job by the way, it
> is  very easy to follow), it looks like there is no
> way to do what I want without modifications to the
> core server (the worker code).
> Has there been any discussion about having handlers
> return a DEFERRED indication up to process_socket(),
> so the transaction information can be saved until a
> later event can answer the request?
> -Craig
> --- Craig S <> wrote:
>>>From what I can tell, Apache passes a request to a
>>handler and expects a result to be written by that
>>handler. What I want to do is send information from
>>the message to do a query of a database that will
>>return an answer later on. I'd like to return from
>>handler and create the result page later on when the
>>answer comes back. 
>>My hope is to reduce the need for multiple threads
>>Any pointers?

View raw message