You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Da...@ssmhc.com on 2007/02/20 21:49:54 UTC

Sry, 1 more question.. Apache2::Reload goofiness

This is getting very frustrating, so I guess I should ask about this 
before I scrap the whole project and go back to CGI.

I'm using Apache::Reload during development since I'm constantly making 
changes to code.  However, it does not appear to be working right.

Let's say I'll have a handler that works.  I make a change and break 
something.  I can go back and undo EVERY change I made and it's still 
broke.  Looking in the Apache error log, I see a variety of errors.  Maybe 
I'll get Can't locate Apache/RequestUtil.pm then I'll hit reload and see 
Not a CODE reference.\n hit reload again and we're back to Not a CODE 
reference.\n once again, then reload again and maybe back to Can't locate 
Apache/RequestUtil.pm then reload again and we're working.  This is not 
over the course of seconds, but over the course of minutes.

Is this a bug that I have to live with or is there something I can do?

Thanks again.

Dan Kelley
Sr. Network Analyst
SSM Health Care, Information Center
(314) 768-5144 / (314) 256-9272


-----------------------------------------
Confidentiality Notice: This email message, including any
attachments, is for the sole use of the intended recipient(s) and
may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.

Re: Sry, 1 more question.. Apache2::Reload goofiness

Posted by Robert Landrum <rl...@aol.net>.
Dan_Kelley@ssmhc.com wrote:
> 
> This is getting very frustrating, so I guess I should ask about this 
> before I scrap the whole project and go back to CGI.
> 
> I'm using Apache::Reload during development since I'm constantly making 
> changes to code.  However, it does not appear to be working right.
> 
> Is this a bug that I have to live with or is there something I can do?
> 

Apache::Reload is based on timestamps, IIRC.  So if you're uploading a 
file from your machine to another machine, make sure both machines have 
the same time (down to a few seconds) or else Apache::Reload won't see 
the changes.

Starting and Stopping apache the only absolute way to ensure that 
changes to modules are loaded that I've found.  Perrin will probably 
disagree.  :)

Rob


Re: Sry, 1 more question.. Apache2::Reload goofiness

Posted by Jonathan Vanasco <mo...@2xlp.com>.
On Feb 20, 2007, at 4:03 PM, Perrin Harkins wrote:

> On 2/20/07, Dan_Kelley@ssmhc.com <Da...@ssmhc.com> wrote:
>> Gotcha.  However, restarting apache doesn't seem to do the trick.   
>> Is it maybe unrelated to Apache2::Reload?


Make sure that you're only running 1 server instance ( maxclients =  
1 ).  Things get screwy when you have multiple apache children  each  
updating on their own.

I use reload on dev, and not in production.   there are a bunch of  
function redefined messages going on, but thats fine with me.

also keep in mind that class inheritance will cause issues with  
reload -- you'll generally need to start/stop if you're overloading a  
parent class method or are removing an overload to fall back onto the  
parent class method.

Re: Sry, 1 more question.. Apache2::Reload goofiness

Posted by Anthony Gardner <cy...@yahoo.co.uk>.
Have you tried Apache::StatINC? Actually, is that available for Apache2?

We've also had problems with Apache::Reload here but we're putting that down to using RHEL mod_perl 1.99 ;) Am waiting to get the latest MP2 installed and hopefully it'll help sort the problems out.

But I agreee with Perrin, if you're seeing the problems after bouncing the server, you're either looking at the wrong code ........... or you're sitting at s.o else's desk ;)

-Ants

Perrin Harkins <ph...@gmail.com> wrote: On 2/20/07, Dan_Kelley@ssmhc.com  wrote:
> Gotcha.  However, restarting apache doesn't seem to do the trick.  Is it maybe unrelated to Apache2::Reload?

If stopping and starting apache doesn't pick up your changes,
something is seriously wrong.  You might be looking at the wrong
apache or updating the wrong files.  Note that I mean "apachectl stop"
and "apachectl start".

> I've noticed that if I go through and make a LOT of changes (commenting stuff out), then go back and undo my changes to get me back to square one, that sometimes fixes it.  However, 5 - 10 minutes per change really gets old.

10 minutes?  You should never have to put up with that.  That reminds
me of working on IBM's WebSphere tools.  Your server should only take
a couple of seconds to restart and should pick up all of your changed
perl files.

- Perrin


 		
---------------------------------
 What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the Yahoo! Mail Championship.

Re: Sry, 1 more question.. Apache2::Reload goofiness

Posted by Perrin Harkins <ph...@gmail.com>.
On 2/20/07, Dan_Kelley@ssmhc.com <Da...@ssmhc.com> wrote:
> Gotcha.  However, restarting apache doesn't seem to do the trick.  Is it maybe unrelated to Apache2::Reload?

If stopping and starting apache doesn't pick up your changes,
something is seriously wrong.  You might be looking at the wrong
apache or updating the wrong files.  Note that I mean "apachectl stop"
and "apachectl start".

> I've noticed that if I go through and make a LOT of changes (commenting stuff out), then go back and undo my changes to get me back to square one, that sometimes fixes it.  However, 5 - 10 minutes per change really gets old.

10 minutes?  You should never have to put up with that.  That reminds
me of working on IBM's WebSphere tools.  Your server should only take
a couple of seconds to restart and should pick up all of your changed
perl files.

- Perrin

Re: Sry, 1 more question.. Apache2::Reload goofiness

Posted by Da...@ssmhc.com.
Gotcha.  However, restarting apache doesn't seem to do the trick.  Is it 
maybe unrelated to Apache2::Reload?

I've noticed that if I go through and make a LOT of changes (commenting 
stuff out), then go back and undo my changes to get me back to square one, 
that sometimes fixes it.  However, 5 - 10 minutes per change really gets 
old.

Dan Kelley
Sr. Network Analyst
SSM Health Care, Information Center
(314) 768-5144 / (314) 256-9272




"Perrin Harkins" <ph...@gmail.com> 
02/20/2007 02:57 PM

To
"Dan_Kelley@ssmhc.com" <Da...@ssmhc.com>
cc
modperl@perl.apache.org
Subject
Re: Sry, 1 more question.. Apache2::Reload goofiness






There is no such thing as reloading modules in Perl.  Apache2::Reload
makes a pretty good try at it, but it can never work perfectly since
there is no language support for this feature.  Usually, I just
restart the server when I make a change.  It only takes a couple of
seconds.

At my current job, we write code that works under both CGI and
mod_perl, which means it works fine to run through CGI when you're
developing, and then switch to mod_perl for testing and production.

- Perrin



-----------------------------------------
Confidentiality Notice: This email message, including any
attachments, is for the sole use of the intended recipient(s) and
may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.

Re: Sry, 1 more question.. Apache2::Reload goofiness

Posted by Perrin Harkins <ph...@gmail.com>.
There is no such thing as reloading modules in Perl.  Apache2::Reload
makes a pretty good try at it, but it can never work perfectly since
there is no language support for this feature.  Usually, I just
restart the server when I make a change.  It only takes a couple of
seconds.

At my current job, we write code that works under both CGI and
mod_perl, which means it works fine to run through CGI when you're
developing, and then switch to mod_perl for testing and production.

- Perrin