Re: Memory / Process leak

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

 



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 :
http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxrequestsperchild


---------------------------------------------------------------------
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