One registry module checks for a new file before a request starts. Another Registry class does no checking at all. Apache::Reload checks a file on disk before the request, or ALL module timestamps. None of these solutions are satisfactory. If code is rolled out, 10+ modperl processes all reloading it at the same time will halt forward motion for 30 seconds or more (depends on code size, init time, and so on).
Is it possible to design something that checks in the EXIT phase, and not every request, just randomly, say, every N times, so all servers don't freeze up .. if they find a named 're-cycle' file is newer than their own life-span, then they child_exit ? Ideally, they eval or syntax check the new module(s), before deciding to child_exit.
If they find they do not eval without error, they erase the re-cycle command file and try not to exit until an admin realizes their mistake ;)
would such a module be a logical plug-in replacement for the Registry handler, a sub-class, or something else? I'd like to write it, but am interested to know if I'm barking up the wrong tree.
This has nothing to do with Registry. You just happen to use Registry, but the issue is applicable for any module running under mod_perl.
What you want to do is to shutdown servers if some timestamp file has changed, but you want to do it at random. First of all don't you think it's a problem if different servers will run different code sets?
Second, you could write a similar to Apache::SizeLimit handler module, which will determine when to terminate the process, but the problem is that you need to reload the parent server anyway if you don't rely on Apache::Reload.
The only realistic solution I can think of is to subclass Apache::Reload not to reload the modules when the timestamp file has changed, unless your rule applies (e.g. randomize it, or whatever). You lose the shared memory benefit here and better off not use Apache::Reload in production.
__________________________________________________________________ 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