Re: a better way to recognize module changes

2010-05-27 Thread Jonathan Swartz
On May 27, 2010, at 1:04 PM, Perrin Harkins wrote: On Thu, May 27, 2010 at 11:11 AM, Michael Schout wrote: My solution involved forking off a watcher process when the server starts up. Wouldn't it be simpler to start a separate daemon for this? You could launch it from apachectl if you do

Re: a better way to recognize module changes

2010-05-27 Thread Fred Moyer
Curiously, I have been using Apache::Reload a lot lately and it has been working really well most of the time. I'm wondering if maybe another way to deal with troublesome module reloads is to subclass Apache::Reload and override the reload process for those specific namespaces. On Thu, May 27, 20

Re: a better way to recognize module changes

2010-05-27 Thread Michael Schout
On 05/27/2010 03:04 PM, Perrin Harkins wrote: > On Thu, May 27, 2010 at 11:11 AM, Michael Schout wrote: >> My solution involved forking off a watcher process when the server >> starts up. > > Wouldn't it be simpler to start a separate daemon for this? The project this is for has apache's sandbox

Re: a better way to recognize module changes

2010-05-27 Thread Perrin Harkins
On Thu, May 27, 2010 at 11:11 AM, Michael Schout wrote: > My solution involved forking off a watcher process when the server > starts up. Wouldn't it be simpler to start a separate daemon for this? You could launch it from apachectl if you don't want to run another command. - Perrin

Re: a better way to recognize module changes

2010-05-27 Thread Michael Schout
On 09/11/2009 04:26 PM, Jonathan Swartz wrote: > I'm thinking about an improved solution to recognizing module changes in > a running server, without restarting the server. This thread is quite old, but it inspired me to implement a similar strategy for dealing with module changes under mod_perl.

Re: a better way to recognize module changes

2009-09-14 Thread Perrin Harkins
That's the simplest way to do it. If you want to get fancy you can use a cleanup handler to diff %INC after requests and log anything new. - Perrin On Fri, Sep 11, 2009 at 6:22 PM, Jonathan Swartz wrote: > Incidentally Perrin - how do you come up with the list of vendor (i.e. not > your project

Re: a better way to recognize module changes

2009-09-14 Thread Perrin Harkins
On Fri, Sep 11, 2009 at 6:18 PM, Jonathan Swartz wrote: > But if you change a module, wouldn't your first subsequent request hit the > 'old' code? That's the benefit of an independent watcher, it'll operate in > the time between when you've changed your module and when you hit the server > again.

Re: a better way to recognize module changes

2009-09-11 Thread John Siracusa
On 9/11/09 6:57 PM, Jonathan Swartz wrote: >> PerlSetVar ReloadAll On >> >> PerlSetVar ReloadHttpds My::Moose >> >> So that modules in ReloadHttpds terminates existing user httpd >> processes and causes the server to fork off new httpd children. > > But again, if Apache::Reload runs as part of t

Re: a better way to recognize module changes

2009-09-11 Thread Jonathan Swartz
On Sep 11, 2009, at 3:53 PM, Fred Moyer wrote: On Fri, Sep 11, 2009 at 3:37 PM, Jonathan Swartz wrote: On Fri, Sep 11, 2009 at 3:11 PM, Jonathan Swartz wrote: It seems like it's available separately in Apache-Reload distribution: http://cpan.uwinnipeg.ca/dist/Apache-Reload But it's

Re: a better way to recognize module changes

2009-09-11 Thread Fred Moyer
On Fri, Sep 11, 2009 at 3:37 PM, Jonathan Swartz wrote: > >> On Fri, Sep 11, 2009 at 3:11 PM, Jonathan Swartz wrote: >>> >>> It seems like it's available separately in Apache-Reload distribution: >>> http://cpan.uwinnipeg.ca/dist/Apache-Reload >>> >>> But it's already pretty much a straw-man opti

Re: a better way to recognize module changes

2009-09-11 Thread Jonathan Swartz
On Fri, Sep 11, 2009 at 3:11 PM, Jonathan Swartz wrote: It seems like it's available separately in Apache-Reload distribution: http://cpan.uwinnipeg.ca/dist/Apache-Reload But it's already pretty much a straw-man option for me. :) Problem: some modules fail to reload properly. Sometimes t

Re: a better way to recognize module changes

2009-09-11 Thread Fred Moyer
On Fri, Sep 11, 2009 at 3:11 PM, Jonathan Swartz wrote: > It seems like it's available separately in Apache-Reload distribution: > http://cpan.uwinnipeg.ca/dist/Apache-Reload > > But it's already pretty much a straw-man option for me. :) >>> Problem: some modules fail to reload properly. Sometime

Re: a better way to recognize module changes

2009-09-11 Thread Fred Moyer
On Fri, Sep 11, 2009 at 3:20 PM, Devin Teske wrote: > Was there any particular reason that it wasn't packaged with 2.0.4? > (meaning, can I just supplant the one from 2.0.3... or was it removed > only to be re-added after being patched for some particular purpose?) It was not included because of

Re: a better way to recognize module changes

2009-09-11 Thread Jonathan Swartz
Incidentally Perrin - how do you come up with the list of vendor (i.e. not your project's) modules to load in the parent? Do you just load a page, look at %INC, and then subtract out your personal modules? Do you have to do this every so often to catch new vendor modules that have snuck in

Re: a better way to recognize module changes

2009-09-11 Thread Devin Teske
Was there any particular reason that it wasn't packaged with 2.0.4? (meaning, can I just supplant the one from 2.0.3... or was it removed only to be re-added after being patched for some particular purpose?) -- Devin On Fri, 2009-09-11 at 15:11 -0700, Fred Moyer wrote: > On Fri, Sep 11, 2009 at 3

Re: a better way to recognize module changes

2009-09-11 Thread Jonathan Swartz
On Sep 11, 2009, at 2:52 PM, Perrin Harkins wrote: On Fri, Sep 11, 2009 at 5:26 PM, Jonathan Swartz wrote: This is the nicest solution I've seen so far. The only problem I can see is its performance - each potentially-changing module has to be loaded on each request. ** How long does i

Re: a better way to recognize module changes

2009-09-11 Thread Jonathan Swartz
It seems like it's available separately in Apache-Reload distribution: http://cpan.uwinnipeg.ca/dist/Apache-Reload But it's already pretty much a straw-man option for me. :) Jon On Sep 11, 2009, at 3:02 PM, Devin Teske wrote: Maybe somebody can refute what I'm seeing, but as of mod_perl-2.0.

Re: a better way to recognize module changes

2009-09-11 Thread Fred Moyer
On Fri, Sep 11, 2009 at 3:02 PM, Devin Teske wrote: > Maybe somebody can refute what I'm seeing, but as of mod_perl-2.0.4, > Apache2::Reload is gone (so you can remove that from your list of > options). It was not bundled with 2.0.4 but is available on CPAN: http://search.cpan.org/dist/Apache-Re

Re: a better way to recognize module changes

2009-09-11 Thread Devin Teske
Maybe somebody can refute what I'm seeing, but as of mod_perl-2.0.4, Apache2::Reload is gone (so you can remove that from your list of options). -- Devin On Fri, 2009-09-11 at 14:26 -0700, Jonathan Swartz wrote: > I'm thinking about an improved solution to recognizing module changes > in a runni

Re: a better way to recognize module changes

2009-09-11 Thread Perrin Harkins
On Fri, Sep 11, 2009 at 5:26 PM, Jonathan Swartz wrote: > This is the nicest solution I've seen so far. The only problem I can see is > its performance - each potentially-changing module has to be loaded on each > request. ** How long does it take for you? I've run a lot of large mod_perl apps t

a better way to recognize module changes

2009-09-11 Thread Jonathan Swartz
I'm thinking about an improved solution to recognizing module changes in a running server, without restarting the server. These are the solutions I know about: 1) Apache2::Reload / Module::Reload These check whether modules have changed on each request, and if so, clear their symbols and re