Re: Reloading Modules Problem [mod_perl2]

[prev] [thread] [next] [Date index for 2004/12/28]

From: Stas Bekman
Subject: Re: Reloading Modules Problem [mod_perl2]
Date: 22:31 on 28 Dec 2004
Vincent Moneymaker wrote:
> I am running Apache 2.0.52 on a solaris 8 box with mod_perl 1.99_12.  Over
> the weekend I tried to upgrade to the 1.99_19 version of mod_perl.  With
> mod_perl 1.99_12 all of the requisite modules reloaded properly when their
> contents changed.  However, with the 1.99_19 version some modules are not
> getting reloaded when their contents are changed.  All of the effected
> modules resided in the directory path '/opt/prod/apache/packages' and did
> not have package declarations.  So I changed all of the modules so that they
> had package declarations per the mod_perl discussion on reloading modules.
> When that didn't work I changed the package declarations again so that they
> all had 'package Apache::[module];' declarations and moved them all over to
> the 'opt/prod/apache/Apache' directory because the modules in that directory
> with 'Apache::[module]' package declarations were getting properly reloaded
> when changes were made to them.
> 
> I then set reload debugging on in the httpd.conf file via the 'PerlSetVar
> ReloadDebug On' configuration and saw that the modules that were formerly in
> the 'packages' directory but are now in the Apache directory were being
> reloaded but unfortunately the changes made to the modules were not being
> reflected in the pages put out by Apache.  The strange thing is that the
> modules that originally resided in the /opt/prod/apache/Apache directory
> are being properly reloaded and are having their changes properly reflected
> in the webpages put out by the Apache server as opposed to the newly added
> modules.
> 
> Additionally, with the ReloadDebugger on, all of the modules that have been
> changed are showing up as being in the 'Apache/[module]' path and the
> 'Apache::[module]' namespace and having their contents reloaded.  However,
> the newly added modules are not having their changes actually show up on the
> pages that are served by Apache, whereas the modules that originally were in
> the Apache:: namespace are having their changes show up.
> 
> With regard to the pertinent details of the my startup.pl file and
> httpd.conf file,
> 
> use Apache::Reload - is in the startup.pl file and
> 
> PerlInitHandler Apache::Reload - is in the httpd.conf file
> 
> I have tried various changes to the httpd.conf file such as adding the
> following configuration - but all is to no avail
> 
> PerlSetVar ReloadAll Off
> PerlSetVar ReloadModules "Apache::*"
> 
> Only when I switch back to mod_perl 1.99_12 do the modules that have been
> newly added to the Apache:: namespace get reloaded when changes are made to
> them.  BTW, I have run into the same reload problem using mod_perl 1.99_17.
> Only version 1.99_12 seems to do the trick
> 
> If anyone has any additional suggestions on how I can solve this problem,
> your responses would be most appreciated.

sorry, but I've lost you, Vincent. You say that only 1.99_12 works, but 
have you tried other version?. I believe 1.99_16 should work too, please try:
http://search.cpan.org/~stas/mod_perl-1.99_16/

If 1.99_16 works and 1.99_17 doesn't that would probably be the change to 
blame:

Added ModPerl::Util::unload_package() to remove a loaded package
as thoroughly as possible by clearing it's stash. [Gozer]

Please confirm that first. Next let's take some specific module, put it in 
PerlSetVar ReloadModules enable the debug and show us the relevant bits 
from the log, so it'll be easier to visualize the problem.


        -- 
        __________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxx.xxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

(message missing)

Reloading Modules Problem [mod_perl2]
Vincent Moneymaker 22:04 on 28 Dec 2004

Re: Reloading Modules Problem [mod_perl2]
Stas Bekman 22:31 on 28 Dec 2004

Re: Reloading Modules Problem [mod_perl2]
Stas Bekman 22:53 on 28 Dec 2004

Re: Reloading Modules Problem [mod_perl2]
Vincent Moneymaker 03:03 on 29 Dec 2004

Re: Reloading Modules Problem [mod_perl2]
Stas Bekman 17:13 on 29 Dec 2004

Re: Reloading Modules Problem [mod_perl2]
Philippe M. Chiasson 18:57 on 04 Jan 2005

Re: Reloading Modules Problem [mod_perl2]
Vincent Moneymaker 04:28 on 05 Jan 2005

Re: Reloading Modules Problem [mod_perl2]
Philippe M. Chiasson 08:17 on 05 Jan 2005

Re: Reloading Modules Problem [mod_perl2]
Vincent Moneymaker 19:54 on 04 Jan 2005

Re: Reloading Modules Problem [mod_perl2]
Stas Bekman 20:10 on 04 Jan 2005

Generated at 12:15 on 16 Jan 2005 by mariachi v0.52