Ben Wilder wrote:
> Question:
> What with the nature of the statistics I need to call from the compiled
> shared objects, I am recompiling the .so files about twice a day (as
> situations change). I need to update the .so files and their corresponding
> .pm module files.
> 
> Does anyone have any suggestions as to how I could expire the old ones the
> Mod_perl processes would be using get Mod_perl to pick up the newly updated
> .so and .pm files?
> 
> I would have a directory of roughly 100 .so files and their corresponding
> .pm files (generated by SWIG) that would be dynamically 'required' by
> calling scripts, about half of these 100 shared objects would be recompiled
> about twice a day!
> 
> Any thoughts much appreciated! 
It should be -- reloading the .pm file if it boostraps the XS component 
normally should suffice

For 2.x:
PerlModule Apache2::Reload
PerlInitHandler Apache2::Reload
PerlSetVar ReloadAll Off
PerlSetVar ReloadModules "X::*"
#PerlSetVAr ReloadDebug On

X is the top-level package namespace for where your .pm files are.

If you have multiple directories that works too.
http://perl.apache.org/docs/2.0/user/coding/coding.html#Auto_Reloading_Modified_Modules_with_Apache2__Reload

IF your builds are croned or even not, you could aways fire off a graceful 
restart -- 2x a day isn't bad.
You're likely loosing a lot of memory "requiring" the modules at run-time 
anyway, so its probably good you restart twice
a day -- unless you preload all of them at startup.

-- 
------------------------------------------------------------------------
Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

"In all that I've done wrong I know I must have done something right to
deserve a hug every morning and butterfly kisses at night."
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /
 / /|_/ / // /\ \/ /_/ / /__
/_/  /_/\_, /___/\___\_\___/
       <___/

Reply via email to