httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <>
Subject Re: Server Process Pool Behavior
Date Fri, 11 Nov 2011 21:21:21 GMT
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.

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