httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sander Temme <>
Subject Re: Server Process Pool Behavior
Date Fri, 11 Nov 2011 21:40:18 GMT

On Nov 11, 2011, at 1:21 PM, Jeff Trawick wrote:

> On Fri, Nov 11, 2011 at 1:02 PM, Jeff Trawick <> wrote:
>> 2011/11/11 Torsten Förtsch <>:
>>> On Friday, 11 November 2011 20:09:09 Jason Gionta wrote:
>>>> While I expect the count to increment by one after each request.  It
>>>> seems like if there is a time gap between requests (over 10 seconds),
>>>> the count gets reset (apr_hash_count = 0).
>>> May it be that your requests simply hit another worker process?
>> That must be it.
>> Jason, your code is going to run in different child processes as new
>> client connections are accepted by different child processes.  The
>> children started off with the same empty hash inherited over fork(),
>> and in different child processes it will have different contents, at
>> least once a child handles its first connection.
> Also, note that in-memory caches served between child processes use
> shared memory.

Check out mod_example_ipc.c in trunk and the new 2.4 branch.  

Note on that... should we port that to slotmem? 


> You can get a bit of mileage in the short term from configuring a
> single-child-process configuration (worker or event MPM,
> MaxClients==ThreadsPerChild) but that probably won't be viable
> (different reasons why you want more child processes, don't want to
> lose your cache if the child segfaults or you need to use
> MaxRequestsPerChild, etc.).

View raw message