> On 02/11/2011 12:02 PM, Randolf Richardson wrote:
> 
> >> I use reload all the time it worked OK for most modules but some modules
> >> (at least the ones that use "use base 'modulename';" ) will have problems.
> >
> >     That's very interesting because where I'm seeing the crashing
> > usually involves code that uses "use base" somewhere (in one
> > particular case the base is for some basic database stuff that
> > utilizes "DBIx::Class"-auto-generated code).
> 
> I highly doubt that it's tied to "use base" at all, but instead is 
> caused by modules that are highly dynamic (do things like create methods 
> at runtime like DBIx::Class would do). But because this magic is buried 
> in the base class you don't see it until you use that base class as your 
> parent (via "use base").

        Using any base class seems to be a common denominator when I'm 
experiencing these problems.  It doesn't matter if DBIx::Class is in 
the picture or not either (there are also many scripts that don't 
interact with any databases).

        This is only happening to me on Windows though too, and just hasn't 
been a problem under NetBSD running the same versions of Apache 
HTTPd, APR, and Perl (although on the Windows side we're using 
ActivePerl so perhaps that's a better culprit since NetBSD is using 
Perl from pkgsrc?) with the same scripts.

> Perl doesn't have a real way to unload a module or to completely force a 
> reload. Apache::Reload tries it's best but there are lots of modules it 
> can't handle. It's not it's fault really, it's a feature that's missing 
> in Perl.

        That's helpful information.  At least on Unix I find that 
Apache2::Reload seems to be doing a good job of making this happen.

        Since I don't use Windows as production servers, this is mostly just 
an annoyance, but it would be nice to figure it out eventually.  =)

> These days, I never use Apache::Reload. I just restart my dev server ( 
> yes, I believe each dev should have their own dev Apache server).

        On Unix, I just restart as well since it's so quick, but on Windows 
I find that restarting is still slow (even on 64-bit Windows 7 which 
does this much faster than Windows XP) so I'll use Apache2::Reload 
for the first few times before restarting HTTPd -- usually the first 
few times don't result in any problems, and sometimes I can get away 
with 5 or 6 reloads before having to restart the HTTPd service.

        I agree that each developer should have their own server to crash 
and burn.  I also like the idea of a pre-production "test" 
environment that is just like production since developer machines can 
often have extra libraries installed that don't exist on the 
production servers (that usually isn't as fun as people claim!).

Randolf Richardson - rand...@inter-corporate.com
Inter-Corporate Computer & Network Services, Inc.
Vancouver, British Columbia, Canada
http://www.inter-corporate.com


Reply via email to