httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Saju Pillai <saju.pil...@gmail.com>
Subject Re: multiple processes: but one module init needed
Date Sun, 25 Jan 2009 09:40:09 GMT
fkater@googlemail.com wrote:
> fkater@googlemail.com:
> 
>> some of the initialization tasks of my module must not be
>> done repeatedly with each spawned server process.
> 
> To be more precise: There is only *one* vhost/configuration
> here, however, due to the mpm settings (see below) apache
> launches *several* processes to serve it -- and this is the
> issue I am addressing to:
> 
> <IfModule mpm_worker_module>
> 	StartServers		2
> 	#StartServers		1
> 	...
> </IfModule>
> 
> When I start just one server my module gets loaded with the
> process once only, of course. However, when several
> processes are launched, then the module gets called for all
> (?) hooks several times.
> 


The post_config hook is called twice in the parent for a unix mpm. 
Maybe you are confusing the double post_config hook invocation with 
"StartServers 2". Look at http://wiki.apache.org/httpd/ModuleLife to see 
how to make init code run only once from post_config

srp
-- 
http://saju.net.in

Mime
View raw message