Apache Server configuration support - httpd not releasing memory after requests

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > September 2007 > httpd not releasing memory after requests





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author httpd not releasing memory after requests
galmond

2007-09-15, 1:22 pm

Hi,
It looks like the issue of memory leaks have come up in the past, but
I have a problem that seems specific to one WinXP machine running
apache 2.2.4 and php 5.2.4(another machine with a similar
configuration does behave this way).

Every request of even a simple html page results in the addition of
about 110k of memory usage to the httpd child process. When
php5_module is loaded, this number is about 520k. The memory usage
stays the same if a subsequent request occurs before the
KeepAliveTimeout period. Over time the process eventually runs out of
memory.

I assume that this is an OS dependency but I'm not sure what
strategies or tools to use for troubleshooting process behaviour. Any
suggestions?

galmond

2007-09-15, 1:22 pm

Just an update...
I've installed Process Explorer and Process Monitor from
http://www.microsoft.com/technet/sysinternals which I've been able to
use to look at the httpd child process in more detail but I don't
recognize any clues. I also installed WinDbg but it's a little beyond
me and I'm not even sure if I'm on the right track by looking at the
httpd process (rather than some other OS thing that manages memory
allocation).

shimmyshack

2007-09-17, 1:34 pm


galmond wrote:

> Just an update...
> I've installed Process Explorer and Process Monitor from
> http://www.microsoft.com/technet/sysinternals which I've been able to
> use to look at the httpd child process in more detail but I don't
> recognize any clues. I also installed WinDbg but it's a little beyond
> me and I'm not even sure if I'm on the right track by looking at the
> httpd process (rather than some other OS thing that manages memory
> allocation).


Have you followed the standard windows directive advice on the apache
website for 2.2.x:
<IfModule mpm_winnt_module>
ThreadsPerChild 250
MaxRequestsPerChild 0
Win32DisableAcceptEx
</IfModule>

for instance. Win32DisableAcceptEx and a couple of others could be
tried.
I have had mixed results, but can report your setup plays nice with
windows for a couple of months uptime at least.

galmond

2007-09-17, 7:25 pm

Yes, I've experimented with those various settings. If I set the
MaxRequestsPerChild to something relatively low (100) then I can force
the httpd child process to reset before it runs out of memory,
although this really just works around the memory leak problem.

I discovered that the memory leak is more or less eliminated if I
don't load the module_cgi.so module. Now the httpd memory usage only
creeps up about 4k for every request (rather than 520k). If I
experimented I could probably find the other modules that account for
this 4k. Why would module_cgi.so be related to this problem, even if I
don't serve any cgi requests?

Thanks

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com