httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter N Lewis <>
Subject Re: [users@httpd] Memory / Process leak
Date Fri, 20 Nov 2009 09:59:59 GMT
On 20/11/2009, at 17:29 , André Warnier wrote:

> Peter N Lewis wrote:
>> I am having a serious problem with my site running out of memory.  apache is leaking
> Probably a lot more likely : your "mod_perl pages" are leaking memory.
> Perl will grab memory as needed, and once grabbed, will never release it to the OS until
perl itself terminates, which rarely happens under Apache/mod_perl.
> Some perl modules do leak memory.  In my experience, for example various XML-parsing
modules do.  It can be tricky to track down, because one "innocent" module may "use" another
"not innocent" module etc..
> If/when you track it down, it may be possible (although inefficient) to isolate the bit
which leaks memory, by converting it to a call to an external process.
> Another possible solution is to work with a prefork version of Apache, and make it so
that each child handles only a number of requests, and then is killed and restarted.  I don't
remember the details, but in most configurations this will also restart that child's perl
interpreter, ergo free its memory back to the OS.
> Look up this :

I already have:

    MaxRequestsPerChild   1000

So the worker processes should die and clean that out.

I'm suspicious that the worker threads are not dieing because I've seen cases where there
are worker threads listed in ps but not listed in server-status (that will probably show up
tomorrow or the next day when the server has been running a bit longer, and I'll post details
of that if I haven't got a response by then).


     Clipboard Switching and Macros with Keyboard Maestro

Keyboard Maestro <> Macros for your Mac
<>           <>

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message