Re: Ordering in %INC for PerlRestart

2002-04-10 Thread Sreeji K Das

Hi Perrin/Ged,

Thanx for the reply (I hardly get replies for subjects
with restart :-( I guess I'm the only one using
PerlFreshRestart (sic !).

My requirement is to do a neat kill of children and
then do a complete restart. I don't want any existing
connections to be terminated abruptly. Also I want a
complete restart (ie. any modified files should be
loaded - using Apache::Reload/StatINC does a lot of
stat()'s  further each children would get a separate
copy).
Restart was working perfectly until mod_perl-1.19.
After that a lot has changed. Now I have fixed a lot
in mod_perl to get Restart fully working.

Sreeji


 --- Perrin Harkins [EMAIL PROTECTED] wrote:  Ged
Haywood wrote:
  Hi there,
  
  On Tue, 2 Apr 2002, [iso-8859-1] Sreeji K Das
 wrote:
  
  
 I use PerlFreshRestart on to reload my modules.
  
  [snip]
  
 However, here my modules are getting loaded before
 the
 PerlRequire'd is loaded (since %INC is a hash).
 
 First, can some1 suggest a solution for this ?
  
  
  I always stop (with SIGTERM) and start my servers
 rather than using
  restart (SIGUSR1) as I find that there are fewer
 surprises.  I think
  that Perrin will agree.  There are very few
 systems that can't cope
  with a few seconds of downtime.
 
 It's certainly a lot safer, and it won't trash your
 shared memory the 
 way PerlFreshRestart will.
 
 - Perrin
  

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com



Re: Ordering in %INC for PerlRestart

2002-04-10 Thread Perrin Harkins

Sreeji K Das wrote:
 Thanx for the reply (I hardly get replies for subjects
 with restart :-( I guess I'm the only one using
 PerlFreshRestart (sic !).

Hopefully you are the only one!

 My requirement is to do a neat kill of children and
 then do a complete restart. I don't want any existing
 connections to be terminated abruptly.

I've done this in a load-balanced cluster by stopping all traffic to the 
machine I want to restart, allowing current requests to finish, and then 
restarting it.  It would be nice to have a graceful shutdown option 
though.

 Also I want a
 complete restart (ie. any modified files should be
 loaded - using Apache::Reload/StatINC does a lot of
 stat()'s  further each children would get a separate
 copy).

I could be wrong, but I'm pretty sure PerlFreshRestart will not result 
in as much shared memory as an actual restart.  How does your shared 
memory look after a clean restart vs. a PerlFreshRestart?

 Restart was working perfectly until mod_perl-1.19.

Maybe for you.  For many people it resulted in unexplained segfaults and 
closure problems in CPAN modules.  It's just not a very safe thing to do.

 After that a lot has changed. Now I have fixed a lot
 in mod_perl to get Restart fully working.

You can send your patches to the dev list.  However, most effort is 
focused on getting mod_perl 2 out right now.

- Perrin




Re: Ordering in %INC for PerlRestart

2002-04-10 Thread Fran Fabrizio


 Thanx for the reply (I hardly get replies for subjects
 with restart :-( I guess I'm the only one using
 PerlFreshRestart (sic !).
 
 
 Hopefully you are the only one!

Pardon my newbie-ness, but can someone explain the perils of 
PerlFreshRestart in a bit more depth?  I hadn't heard of it being 
dangerous until now.

Thanks,
Fran




Re: Ordering in %INC for PerlRestart

2002-04-10 Thread Geoffrey Young

Fran Fabrizio wrote:
 
  Thanx for the reply (I hardly get replies for subjects
  with restart :-( I guess I'm the only one using
  PerlFreshRestart (sic !).
 
 
  Hopefully you are the only one!
 
 Pardon my newbie-ness, but can someone explain the perils of
 PerlFreshRestart in a bit more depth?  I hadn't heard of it being
 dangerous until now.

http://perl.apache.org/guide/troubleshooting.html#Evil_things_might_happen_when_us

is a good place to start, and searching the archives will yield a bit more, but 
Perrin's
description in the previous post pretty much sums it up.

HTH

--Geoff



Re: Ordering in %INC for PerlRestart

2002-04-08 Thread Perrin Harkins

Ged Haywood wrote:
 Hi there,
 
 On Tue, 2 Apr 2002, [iso-8859-1] Sreeji K Das wrote:
 
 
I use PerlFreshRestart on to reload my modules.
 
 [snip]
 
However, here my modules are getting loaded before the
PerlRequire'd is loaded (since %INC is a hash).

First, can some1 suggest a solution for this ?
 
 
 I always stop (with SIGTERM) and start my servers rather than using
 restart (SIGUSR1) as I find that there are fewer surprises.  I think
 that Perrin will agree.  There are very few systems that can't cope
 with a few seconds of downtime.

It's certainly a lot safer, and it won't trash your shared memory the 
way PerlFreshRestart will.

- Perrin




Re: Ordering in %INC for PerlRestart

2002-04-07 Thread Ged Haywood

Hi there,

On Tue, 2 Apr 2002, [iso-8859-1] Sreeji K Das wrote:

 I use PerlFreshRestart on to reload my modules.
[snip]
 However, here my modules are getting loaded before the
 PerlRequire'd is loaded (since %INC is a hash).
 
 First, can some1 suggest a solution for this ?

I always stop (with SIGTERM) and start my servers rather than using
restart (SIGUSR1) as I find that there are fewer surprises.  I think
that Perrin will agree.  There are very few systems that can't cope
with a few seconds of downtime.

73,
Ged.