I had a very nasty day last week. We're in testing of our complete recode of the site, mod_perl, TT, OO, the usual stuff. I'm comfortable with developing for mod_perl, now, but am always scared by the ever present pollution of data between processes.
We run our package tests, all is well, we install everything, all is well, we start the server (with -X, single user mode to cache any data contamination), all is well, we run through the entire site tailing error logs etc, all is well.
Someone makes a minor tweak and installs the code, restart the server, all is NOT well! My search prefs are now affecting someone else's. Nothing is appearing in the domain error logs. Another tweak and install, now we get segfaults when trying to do a search!
Panic sets in.
Install gdb, do a back trace, see lots of perl internal OPS that I haven't a clue about, then I check the main httpd_perl error log I see stuff about redefined subroutines, one of which is from my first CPAN module!
More panic, talk to LPM on IRC, get various suggestions, go check them out.... nothing...
Try running the code on another machine... it works...
Do some googleing... nothing...
Do some more googleing... ahhh... PerlFreshRestart can cause this sort of error...
Remove PerlFreshRestart... and life is good again....
Of course all of this took about 3 hours!
Moral, don't put stuff in your apache config just because it says so in the book and sounds like a good idea at the time. Only do it when you need it and have read up about it.
Someone mentions Apache::Reload as a good alternative, I've not tried it yet, and won't be unless I really need it and have time to test it out.
I think that recommendation still stands that you stop and restart a mod_perl server, and don't give it a HUP/USR1.
-Dom