You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Brad Bowman <li...@bereft.net> on 2004/05/04 09:15:00 UTC
mp guide: sections -> leaks
Hello,
I've had problems with <Perl> sections causing leaks with
graceful restart, at least with some versions/setups of mod_perl.
I thought the problem should be noted in the guide.
A patch is attached for:
http://perl.apache.org/docs/1.0/guide/troubleshooting.pod.orig
I no longer have my test code, it was a while ago.
Here's the link and mail exchange that confirmed my tests:
http://aspn.activestate.com/ASPN/Mail/Message/modperl/304620
> >> > I have a static Solaris compilation, and have the same problems
> >> > where the parent seems to grow by 1M each HUP.
> >>
> >> that's strange, do you have PerlFreshRestart On or some <Perl> sections?
> >> otherwise, kill -HUP with a static modperl is a noop.
> >
> >You got me! I have <Perl> sections ... but I didn't know
> >it was such a crime. Pretty bizarre behavior if you ask me.
>
> it's not a crime, but if you're running Perl code during restart there's a
> strong chance you'll be growing the server size. i agree 1M is bizarre
> though.
Brad
--
... There is dignity in paucity of words. ... -- Hagakure
Re: mp guide: sections -> leaks
Posted by Stas Bekman <st...@stason.org>.
Brad Bowman wrote:
>
>>Thanks for the patch, Brad. But are you sure this is still the case with the
>>latest mp1? This thread that you've quoted is 4 years old. And it doesn't show
>>any code that may cause such a leak.
>
>
> I'm reasonable sure I got the leaks with apache 1.3.27 and
> mod_perl 1.27. I don't know about newer versions.
>
> I've looked again and can't find the code I used, I think it
> was defining a sub which was probably the leak.
>
>
>>>>it's not a crime, but if you're running Perl code during restart there's a
>>>>strong chance you'll be growing the server size. i agree 1M is bizarre
>>>>though.
>>
>>In which case this should probably mention:
>>
>>
>>>+Also, be aware that <Perl> sections can also cause leaks during
>>>+graceful restarts. See the (sub)thread:
>>>+http://aspn.activestate.com/ASPN/Mail/Message/modperl/304620
>>
>>"when running some perl code"? as in 'besides using <perl> sections to do
>>dynamic configuration'?
>
>
> I took the "if you're running Perl code during restart" to include
> dynamic configuration code. I don't really understand the process
> so I'll defer to you. I'd just like to see <perl> sections mentioned
> as a possible culprit.
Well, I hoped that someone will tune in and share a code sample, but as noone
did (at least yet) I've just committed your original patch, warning about the
possibility of the leak.
Thank you, Brad.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: mp guide: sections -> leaks
Posted by Brad Bowman <li...@bereft.net>.
> Thanks for the patch, Brad. But are you sure this is still the case with the
> latest mp1? This thread that you've quoted is 4 years old. And it doesn't show
> any code that may cause such a leak.
I'm reasonable sure I got the leaks with apache 1.3.27 and
mod_perl 1.27. I don't know about newer versions.
I've looked again and can't find the code I used, I think it
was defining a sub which was probably the leak.
> >>it's not a crime, but if you're running Perl code during restart there's a
> >>strong chance you'll be growing the server size. i agree 1M is bizarre
> >>though.
>
> In which case this should probably mention:
>
> > +Also, be aware that <Perl> sections can also cause leaks during
> > +graceful restarts. See the (sub)thread:
> > +http://aspn.activestate.com/ASPN/Mail/Message/modperl/304620
>
> "when running some perl code"? as in 'besides using <perl> sections to do
> dynamic configuration'?
I took the "if you're running Perl code during restart" to include
dynamic configuration code. I don't really understand the process
so I'll defer to you. I'd just like to see <perl> sections mentioned
as a possible culprit.
Brad
--
Ikuno Oribe said, "If a retainer will just think about what he is to do
for the day at hand, he will be able to do anything. If it is a single
day's work, one should be able to put up with it. Tomorrow, too, is but
another single day." -- Hagakure http://bereft.net/hagakure/
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: mp guide: sections -> leaks
Posted by Stas Bekman <st...@stason.org>.
Brad Bowman wrote:
> Hello,
>
> I've had problems with <Perl> sections causing leaks with
> graceful restart, at least with some versions/setups of mod_perl.
> I thought the problem should be noted in the guide.
>
> A patch is attached for:
> http://perl.apache.org/docs/1.0/guide/troubleshooting.pod.orig
>
> I no longer have my test code, it was a while ago.
> Here's the link and mail exchange that confirmed my tests:
>
> http://aspn.activestate.com/ASPN/Mail/Message/modperl/304620
Thanks for the patch, Brad. But are you sure this is still the case with the
latest mp1? This thread that you've quoted is 4 years old. And it doesn't show
any code that may cause such a leak.
Or do you refer to this note:
>>it's not a crime, but if you're running Perl code during restart there's a
>>strong chance you'll be growing the server size. i agree 1M is bizarre
>>though.
In which case this should probably mention:
> +Also, be aware that <Perl> sections can also cause leaks during
> +graceful restarts. See the (sub)thread:
> +http://aspn.activestate.com/ASPN/Mail/Message/modperl/304620
"when running some perl code"? as in 'besides using <perl> sections to do
dynamic configuration'?
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html