httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Martin <ne...@4js.com>
Subject Re: [users@httpd] Timeouts with Threaded Apache 2.2.3
Date Tue, 13 Feb 2007 10:06:59 GMT

Hi Sander,

Thanks for the information.
I'll make sure the mod_foo is thread safe, stripped down and retest.

On the same subject of 'thread safe' does anyone know if mod_perl
is being made thread safe? ( I believe there was a project for a threaded
version but it died, so just wondering is the main mod_perl branch was
being considered for making thread safe. )

Regards,
Neil

Sander Temme wrote:
> 
> On Feb 8, 2007, at 3:08 AM, Neil Martin wrote:
> 
>> so we retested with a dummy module call mod_foo ( attached ) but we  
>> still get timeouts.
>> Is this a know issue is the module api in threaded Apache ?
> 
> 
> You clearly based your mod_foo on mod_example, and just about the  only 
> thing you deleted was the comment atop the file that warns the  
> mod_example code is not thread-safe.  You should at least remove the  
> call to trace_add() from the handler function, because that uses  global 
> variables and can't be used in a threaded server.
> 
> I'm trying to clean this up for the mod_example.c in our development  
> trunk, but this has not been done for 2.2.x.
> 
> In a typical module (I think most if not all of your magic is in the  
> handler function?), you don't need to implement any of the handlers  
> unless you're actually using them to do something. You might override  
> child_init to set up your database connection pool, but won't need  
> stuff like post_read_request or http_scheme.
> 
> You can generate a very small, functional sample module by calling  apxs 
> -g -n foo
> 
> When running your benchmarks, you should make sure that you tune  Apache 
> in relation to the load you are sending it. The default worker  mpm 
> configuration tops out at 150 concurrent requests, and you are  running 
> ab at 200... that may not be a problem given the connection  backlog in 
> the kernel, but especially if your module takes some time  to do its 
> database thing, you may run out of resources and render ab  confused. 
> See conf/extra/httpd-mpm.conf to get an idea of the  tunables for the 
> worker MPM.
> 
> S.
> 

-- 
Regards,
--------------------------------------------------------------------------------
Neil J MARTIN [neilm@4js.com] Tel +44 (0)208 757 5817  Fax +44 (0)208 757 5827
Product Support Engineer - Four J's Development Tools (UK) [www.4js.com]

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message