You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Graham Leggett <mi...@sharp.fm> on 1999/05/27 10:47:28 UTC

Apache memory allocation

Hi all,

Is there a way of monitoring Apache's memory usage while it's running?

I have a busy reverse proxy installation that leaks memory over time,
eventually swamping the machine, and swallowing all 768MB of RAM and all
2GB of swap after 2 or 3 days or so.

I need to find out which part of Apache is allocating all the memory, so
that I can track down the section of Apache that's the memory hog. I
know Apache functions handle memory management, do these functions aid
in debugging in any way?

I am now desperate to fix this. I've converted a major installation to
Apache because it gives us every single feature we need but one -
reliability.

Can anyone help?

Regards,
Graham
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight...

Re: Apache memory allocation

Posted by Dirk-Willem van Gulik <di...@webweaving.org>.
On Thu, 27 May 1999, Graham Leggett wrote:

> Is there a way of monitoring Apache's memory usage while it's running?

Compile with ALLOC_USE_MALLOC (see alloc.c) and use a debugging malloc
such as libxalloc and libmalloc (ftp://ftp.cs.toronto.edu/pub/moraes/,
http://home.sol.no/~sverrehu/pub-unix/files/).
 
> I have a busy reverse proxy installation that leaks memory over time,
> eventually swamping the machine, and swallowing all 768MB of RAM and all
> 2GB of swap after 2 or 3 days or so.

What is your MaxRequestsPerChild ?
 
> I need to find out which part of Apache is allocating all the memory, so
> that I can track down the section of Apache that's the memory hog. I
> know Apache functions handle memory management, do these functions aid
> in debugging in any way?

Do you have any special modules ? Are you using Solaris 2.5 ?
 
Dw.