I think Apache::DB_File is just what you are after.


Is that on CPAN? I can't find it. I _can_ find Apache::Session::DB_File and Apache::Session::Store::DB_File, is that what you mean?

Sorry, I messed up the names and owners. I meant Tie::DB_Lock by Ken Williams, David's DB_File::Lock is somewhat related


I don't think there is any other way to make parent do something. Remember that all it does is sitting in a tight loop and watching after the number of available child processes and spawns new ones/kills old ones.


But the select loop is in the parent, isn't it?

Not necessarily, in httpd-2.0 an mpm module may implement it in a different way, but I think it is in prefork mpm.


It would make sense to me to have the PreConnectionHandler run in the parent, so it doesn't need to start up a child, only to find out that you won't accept the connection...

Hmm, why do you try to make the parent run the PreConnection handler? let's assume for a second that it did so. All other incoming requests will be blocked as the parent won't be able to dispatch them to the workers. Though going back to my mpm note, above, you can implement your own mpm which will do what you want. Also did you see:
http://perl.apache.org/docs/2.0/user/handlers/protocols.html#PerlPreConnectionHandler
just substitute the inlined hash with a dbm file, add locking with DB_File::Lock or use Tie::DB_Lock and you are all set.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html



Reply via email to