Gordon Henriksen wrote: > I see three options open to me: > > 1. static mod_perl w/ PerlFreshRestart > Reloads %INC. > downside: Heresay claims historical instablity. > > 2. dynamic mod_perl > Tears down & cleans up Perl interpreter on graceful restart. > downside: Heresay claims historical instablity. > > 3. static mod_perl w/ Apache::StatInc > Runs many stat()'s per request. > downside: Runs many stat()'s per request.
Frankly, those options all suck for anything other than development servers. A production server on a busy site needs to be fully stopped and restarted when you upgrade your code. Doing anything else is just asking for trouble (strange closure issues, for example) and will trash your shared memory to boot. The best way I've found to deal with this problem is to have multiple servers behind a load-balancer and do a "rolling" restart. If you have servers A and B, you take A out of the load balancer temporarilly, upgrade it, add it back in, take B out, upgrade it, add it back in. Using this technique, we were able to smoothly upgrade production servers on a very busy cluster of machines during normal business hours while customers were on the site. - Perrin