homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

KeepAlive ON + 22GB memory on Debian 6.0
Problem with lacking memory when KeepAlive is ON

Msg#: 4446653 posted 7:23 pm on Apr 27, 2012 (gmt 0)


I am using Apache as web server that redirect by proxy specific subdomain static.example.com to Lighttpd. Lighttpd works on another port than Apache, but on the same IP and server.

My website server flash games ans images so sometimes it takes a while to load content, but I was using KeepAlive ON with no problem.

Now, I reinstalled OS from Debian 5.0 to Debian 6.0 and when I turn on KeepAlive I have all 24GB server memory consumed by Apache and 1002 process running. I want more and allow more, but there is probably no more memory.

My previous configuration on Debian 5.0:

KeepAlive ON
<IfModule mpm_prefork_module>
StartServers 25
MinSpareServers 10
MaxSpareServers 35
ServerLimit 3520
MaxClients 3520
MaxRequestsPerChild 150

I didn't checked how much memory and processes Apache consumed, because it worked. It works on Debian 5.0 more than one year.

On Debian 6.0 I had to switch to KeepAlive Off and I also decreased ServerLimit and MaxClients to 1000, because there is max 400 processes when KeepAlive is off.

Is something different on Debian 6.0 regarding Apache + Lighttpd?

When I was using Lighttpd through Apche proxy and when a large game is loading then Apache still keep process instead of killing it?

Could I upgrade something to have KeepAlive On?

I tested website with KeepAlive off on Google Page Speed and this tool said me: "Turn On KeepAlive. Your website sucks without it"
I tested this configuration on two servers with identical hardware. There was 1002 apache processes and 22 GB memory consumed. I checked it on munin. It was committed memory.



Msg#: 4446653 posted 7:38 pm on Apr 27, 2012 (gmt 0)

There is also PHP 5.4. Before was PHP 5.3. Could it be "reason for failure"?


WebmasterWorld Senior Member billys us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 4446653 posted 7:59 pm on Apr 27, 2012 (gmt 0)

Is there a database server involved? Did you use your old my.conf when you moved to Debian 6.0?


Msg#: 4446653 posted 8:24 pm on Apr 27, 2012 (gmt 0)

I'm using Postgresql on another server. Database servers is in local network so latency is less then 1ms. I'm caching data with Memcached. I have DirectAdmin installed.


Msg#: 4446653 posted 7:53 am on Apr 28, 2012 (gmt 0)

I attached graphs from munin. You can see big change in memory and in apache processes counter when I turn on KeepAlive On instead of KeepAlive off.
Apache processes
[img207.imageshack.us ]

Exceed 12GB server memory
[img214.imageshack.us ]

I upgraded from PHP 5.4.0 to PHP 5.4.1, but there was no change (today hop).


10+ Year Member

Msg#: 4446653 posted 5:27 pm on Apr 29, 2012 (gmt 0)

Are you also setting MaxKeepAliveRequests?

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved