Re: Memory / Process leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 memory/processes.
> 
> 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).

Thanks,
   Peter.

-- 
     Clipboard Switching and Macros with Keyboard Maestro

Keyboard Maestro <http://www.keyboardmaestro.com/> Macros for your Mac
<http://www.stairways.com/>           <http://download.stairways.com/>




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux