> The question I had regards where to put the 'Apache::Reload' directive. > The documentation suggests something like: > > > > PerlInitHandler Apache::Reload > PerlSetVar ReloadAll Off > > PerlSetVar ReloadTouchFile /tmp/reload_modules > > > > The problem I see in a production machine is that each child process > will see this on the next request, and attempt to reload it's modules. > At that point, you'll loose the shared memory the modules use between > child processes.
that sounds right to me > > > > On top of this, the parent process will never get this, so it will never > reload modules in the parent. The next time a new child is forked, on > the first request it receives it will again attempt to reload the > changed modules. Is this correct? Or am I missing something? I'm not sure about that. > > > > The alternative I've used is this: > > > > PerlRestartHandler Apache::Reload > PerlSetVar ReloadAll Off > PerlSetVar ReloadTouchFile /tmp/reload_modules > > > > Then when I've uploaded any changes, I touch the change file, and do an > 'apachectl graceful' to restart the backend. I think this works nicely > because: [snip] > > 2) Doing it in the restart handler means that the parent process reloads > the modules, and all the newly forked children have shared copies. > > > > Can anyone tell me if I'm missing something here? > that sounds right to me. I've not tested it with Apache::Reload specifically, but I did test using Apache::RegistryLoader with a PerlRestartHandler to reload Registry scripts in the parent process on restart and it seemed to work as we both suspected (recipe 17.4 bears the fruit of this labor :) I suspect that it is the same with Apache::Reload unless there is something specific to the reloading logic that prevents it. --Geoff