Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

graceful restarts, modperl and pre-loaded modules

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


pc88mxer at gmail

Jul 14, 2009, 11:04 AM

Post #1 of 6 (1041 views)
Permalink
graceful restarts, modperl and pre-loaded modules

Hi,

I was wondering how graceful restarts of apache interact with modperl
and "pre-loaded" modules.

Specifically, if the apache parent process loads module Foo.pm, and I
modify Foo.pm, can I use a graceful restart to get the apache parent
to read the new version of Foo.pm?

Thanks,
ER


gozer at ectoplasm

Jul 14, 2009, 11:36 AM

Post #2 of 6 (975 views)
Permalink
Re: graceful restarts, modperl and pre-loaded modules [In reply to]

On 14/07/09 14:04 , E R wrote:
> Hi,
>
> I was wondering how graceful restarts of apache interact with modperl
> and "pre-loaded" modules.
>
> Specifically, if the apache parent process loads module Foo.pm, and I
> modify Foo.pm, can I use a graceful restart to get the apache parent
> to read the new version of Foo.pm?

Yes, it should work that way.

On a gracefull restart, all perl interpreters are shutdown and new,
clean ones replace them, reloading any module you configure for preloading.

--
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
Attachments: signature.asc (0.24 KB)


pharkins at gmail

Jul 14, 2009, 12:00 PM

Post #3 of 6 (973 views)
Permalink
Re: graceful restarts, modperl and pre-loaded modules [In reply to]

On Tue, Jul 14, 2009 at 2:36 PM, Philippe M.
Chiasson<gozer [at] ectoplasm> wrote:
> On a gracefull restart, all perl interpreters are shutdown and new,
> clean ones replace them, reloading any module you configure for preloading.

I don't think this is right, Philippe, unless something has changed
with it in mod_perl 2. Graceful restart used to just re-read the
conf, not restart the perl interpreter.

- Perrin


gozer at ectoplasm

Jul 14, 2009, 12:25 PM

Post #4 of 6 (978 views)
Permalink
Re: graceful restarts, modperl and pre-loaded modules [In reply to]

On 14/07/09 15:00 , Perrin Harkins wrote:
> On Tue, Jul 14, 2009 at 2:36 PM, Philippe M.
> Chiasson<gozer [at] ectoplasm> wrote:
>> On a gracefull restart, all perl interpreters are shutdown and new,
>> clean ones replace them, reloading any module you configure for preloading.
>
> I don't think this is right, Philippe, unless something has changed
> with it in mod_perl 2.

Yup, this has certainly been fixed up in mod_perl 2.

> Graceful restart used to just re-read the
> conf, not restart the perl interpreter.

Now I believe it does, and it's easy to verify.

A loaded PerlModule will get reloaded on graceful restart, that's for sure.

--
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
Attachments: signature.asc (0.24 KB)


pharkins at gmail

Jul 14, 2009, 1:18 PM

Post #5 of 6 (977 views)
Permalink
Re: graceful restarts, modperl and pre-loaded modules [In reply to]

On Tue, Jul 14, 2009 at 3:25 PM, Philippe M.
Chiasson<gozer [at] ectoplasm> wrote:
>> Graceful restart used to just re-read the
>> conf, not restart the perl interpreter.
>
> Now I believe it does, and it's easy to verify.
>
> A loaded PerlModule will get reloaded on graceful restart, that's for sure.

That won't be enough in all cases unless it actually replaces the
interpreter, like PerlFreshRestart used to.

I would do a graceful shutdown and restart.

- Perrin


clint at traveljury

Jul 15, 2009, 2:42 AM

Post #6 of 6 (976 views)
Permalink
Re: graceful restarts, modperl and pre-loaded modules [In reply to]

> That won't be enough in all cases unless it actually replaces the
> interpreter, like PerlFreshRestart used to.
>
> I would do a graceful shutdown and restart.

I've had lots of problems with graceful restarts hanging indefinitely, I
think caused by issues with the mod_ssl module.

I'd also recommend: apachectl graceful-stop; apachectl start

clint

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.