On Mon, Apr 16, 2001 at 04:44:23AM +0530, [Aquitaine] wrote:
> Have a slight problem with my mod_perl script,
> Every time i run it i notice that apache grows in size. The increase in size
> is about
> 10 kb per 100 executions, but if this carries on i cant put the script on in
> a production environment.
> Can someone help me figure why this is happening ?
> Will mention that I am using DBI in the script to connect to a MySQL server.
We have the same problem. I believe my code is squeaky clean but each
Apache process's unique pages count increases with time. Still, 10kb/100req
isn't all that bad.
Make use of MaxRequestsPerChild. At a rate of 500, you will still win on
the reduced overhead and not have Apache processes that grow out of control.
I scoffed at the idea when I first heard it, but was much happier to
consider it after I reached my wits end. It works nicely with that
variable set, so I'll leave it at that.
(I'm not sure this is even a code problem. Maybe perl is just bad at keeping
a single consistent working set and the copy-on write from the parent Apache
kicks in and keeps increasing unique per process memory consumption).
--
Michael Bacarella <[EMAIL PROTECTED]>
Technical Staff / System Development,
New York Connect.Net, Ltd.