perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fred Moyer <f...@redhotpenguin.com>
Subject Re: mod_perl2 memory growth after restart of Apache
Date Fri, 15 Jul 2011 21:34:19 GMT
On Fri, Jul 15, 2011 at 1:54 PM, ChristoDeluxe <nabble@cfs.parliant.com> wrote:

> This is the case that I'm seeing (Apache/2.2.19 (FreeBSD 8.0) mod_perl/2.0.5
> Perl/v5.8.9) where for every time I run apachectl restart, it leaks a few MB
> of RAM into the parent process and thus into all the children too.  The size
> of the leak is very dependent on how much code I preload into mod_perl using
> a PerlRequire in the main server's config, so my guess is that the compiled
> version of my perl modules is leaking for every restart.
>
> Is this a known issue, is it specific to FreeBSD, or is there a way to
> mitigate this leaking?

If you have Dtrace installed on your system, you can use the iosnoop
utility to see what files are accessed during the graceful restart,
and add those modules via PerlRequire or startup.pl.  When I used this
approach with Perl 5.8.8, there were a few files like utf8_heavy.pl
that were being stat'd each time a child httpd forked, so I was able
to really maximize the amount of used modules in shared memory.

Mime
View raw message