The Apache Haus Forum

Forum Topics => Apache 2.2 => Topic started by: snitin on April 16, 2014, 11:19:20 AM

Title: httpd.exe using lot of Memory on Windows
Post by: snitin on April 16, 2014, 11:19:20 AM
We are running an application which uses Apache 2.2.22 as a WebServer on Windows Server 2008 R2 Enterprise.

Looking at the httpd.exe child process in Process Explorer, we see the Private Bytes increasing by 60 MB every day.

This makes it mandatory to restart Apache every 9 working days when Apache hits at it's peak of around 1.2 GB.

Server-status shows:

Total accesses: 1042790 - Total Traffic: 552.1 GB
3.2 requests/sec - 1.7 MB/second - 0.5 MB/request
90 requests currently being processed, 510 idle workers



Intel(R) Xeon(R) CPU E5-2609 @2.40 GHz (2 processors)
RAM: 128 GB


KeepAliveTimeout 60
SendBufferSize 16384
Timeout 900
ThreadsPerChild 600

We did ran Apache Benchmark tool on some urls (urls from application and also Apache index.html). However we dint observed any memory increase.

We thought of using MaxRequestsPerChild, but since it's a Windows machine, with one child process, it will cause Apache to restart.

The server is a Production server and used 24 x 7. I would like to understand how can I reproduce the memory increase on exactly similar cloned TEST environment. What are the factors which can impact the memory?

I already have a TEST environment, with the only difference of load and usage.

I will also appreciate if I can get any pointer to identify what is taking this memory on windows and where to look at?

Title: Re: httpd.exe using lot of Memory on Windows
Post by: Gregg on April 16, 2014, 11:20:12 PM
No clue but I'd try benchmarking further into your application. It may not be in the initial request to the application but something further in. If this is the case it may be easier to figure just what is causing it.

Off the top of my head the ldap auth module had a leak in it but I'm not sure the module is even in 2.2 and if it is, your app would be having to use ldap for client auth/
Title: Re: httpd.exe using lot of Memory on Windows
Post by: snitin on April 22, 2014, 11:55:36 AM
I did some more tests.

I ran the ab tool with different application urls, but that didn't showed any substantial increase. Also most of the times, the behavior regarding memory increase was not consistent with ab tool.

However then I ran ab tool on apache's index.html with three new users through a batch script. I see some spurt in memory.
Then I again ran the ab tool but this time with other three newly created users. I see the memory increatse.
I repeated the test for three more new users and ola..I again see.

Can you point me to the link to the ldap memory leak you mentioned?

Appreciate your help.


Title: Re: httpd.exe using lot of Memory on Windows
Post by: Gregg on April 22, 2014, 08:34:00 PM
See the changes for 2.2.27

looks like #12 in this bug report

It states unlikely, but you may have an edge case affected by it.
It could very well be some other 3rd party module you are using or combination of modules as well.