Gossamer Forum
Home : General : Perl Programming :

Apache/mod_perl

Quote Reply
Apache/mod_perl
Someone recently told me apache should be restarted every hour or so if mod_perl is installed. Is that right and/or realistic?


=head

Useless info:

It is 1am and some fool just called us and it was a wrong number, can you believe it?

=cut

Last edited by:

RedRum: Mar 1, 2002, 5:07 PM
Quote Reply
Re: [RedRum] Apache/mod_perl In reply to
Good lord no. That's not right at all. There is no reason to have to restart Apache running under mod_perl.

Poorly coded scripts can leak memory under mod_perl as it is always running, so if you have something that is leaking you should:

1. Fix it.

2. If you can't fix it, there is a MaxRequestsPerChild option in Apache. Set this to a large number and after your mod_perl child has served that many requests it will exit (different then restarting Apache).

Obviously you could just add a cron job to restart Apache every hour, but that's not the right fix for the problem.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Apache/mod_perl In reply to
Hmm....thanks.

The only two scripts running under mod_perl are GForum and Links SQL.

When I do a ps aux most of the 10-15 apache processes are using 10MB memory and 0.0 cpu.

Is that about right?

Last edited by:

RedRum: Mar 2, 2002, 2:15 AM
Quote Reply
Re: [RedRum] Apache/mod_perl In reply to
That seems very good to me RedRum. My httpd_perl processes use up to 20MB. The light end with mod_proxy and PHP uses 8MB.

Mine aren't compiled with DSO, so that may make a difference... not sure.
Quote Reply
Re: [RedRum] Apache/mod_perl In reply to
Hi,

10 megs seems a bit small. Ours tops out at around 18 megs after some usage (as there are several in memory caches that fill up).

By the way, it's not 10 megs per httpd. 80-90% of that is shared memory.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Apache/mod_perl In reply to
>>10 megs seems a bit small. <<

They aren't really being used except for making plugins :)