[TriLUG] Apache Server Gobbling RAM
Stephen Hoffman
srhoffman at gmail.com
Tue Dec 18 22:55:50 EST 2007
Ok, I am having an issue with an apache server that I can't seem to figure
out (nor can any of my colleagues). I'm hosting a site that see's roughly
2500 unique visitors/day and roughly 2GB of bandwidth (According to
awstats). The server alerted us yesterday that swap space was over 80%
full, when we took a look, it was all apache processes. It seems that each
process is quickly climbing upwards of 130MB (looking a /proc/$PID/smaps)
and when I say quickly I mean in a matter of a few seconds. I have adjusted
the MaxClients setting so that at those consumption rates it will only spawn
30 servers which should leave me with at least a few MB of my 4GB of RAM for
the system, which it actually is.
The server is really a static page server with a few CGI's and Server Side
Includes enabled, but for the most part is a forms repository. I've looked
at the logs fly by and all the traffic looks fairly legitimate, we're
getting indexed a bit more often then I'd like to see, but really it's just
lots of PDF downloads. The CPU is next to 0 even when it was swapping like
crazy so it feels like some sort of memory leak, but I can't find anything
to point to that other then the fact that memory consumption climbs so fast
and never appears to be reclaimed by the system. I also set the
MaxRequestsPerChild down to 1000 (from 10000) in hopes that child processes
would be recycled faster but that doesn't appear to be doing jack.
The system is a Dual Quad Core @ 3.0GHz with 4GB of RAM running SLES 10.
Apache is 2.2.something using the prefork version. I've never RUN a SLES
server before (always been a RHEL guy) but I wouldn't think the OS would
matter that much especially since it doesn't appear that the OS is the
issue, just the apache server. If anyone has any thoughts on things to
check I'm open, this is starting to bother me.
Thanks in advance!
Steve
More information about the TriLUG
mailing list