Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Main Support Categories > Server Platforms
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Server Platforms
Discussion regarding the Ubuntu Server Edition. For more information on the Ubuntu Server Team, please visit their wiki page or Launchpad page.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old November 25th, 2008   #1
davidshere
Gee! These Aren't Roasted!
 
davidshere's Avatar
 
Join Date: Aug 2006
Location: Charlotte, North Carolina
Beans: 201
Ubuntu 8.04 Hardy Heron
Send a message via AIM to davidshere Send a message via Yahoo to davidshere
apache stops responding after a few days

I'm experiencing a memory problem with apache. Apache stops responding to webpage requests after a few days. When we first discovered this problem, there were 214 apache processes and all of the virtual memory was full.

Steps I have taken:
1. I reduced the MaxClients option to 25 (it was previously at 150) and rebooted the box. This seems to effectively limit the number of apache processes, but the memory usage continued to rise and about 2 days later apache stopped responding again. The swap memory was still at 0 but the physical memory was at about 440MB.
2. I reduced the MaxRequestsPerChild to 40 (it was previously unlimited). This appears to make no difference at all; the same behavior we saw under Step #1 is still there. It's been running like this for only about an hour and the memory usage has gone from ~113MB at startup to ~300MB now.

In each case the average apache process is about 18MB, which is similar to apache installations I have running on other machines. When apache stops responding, restarting apache will get apache to start responding again, but none of the child processes running before the restart are killed. The only way to free up the memory and stop these processes is to reboot the machine. Right now our workaround is to reboot the machine daily.

I'm running server 8.04 on a virtual machine, with apache2, mysql5, and php5. All up to date. The machine has 512 MB RAM. We host about 8 websites on this server and it gets light to moderate traffic. Most sites are mambo or some equivalent CMS. All work fine for a few days after the machine is started. These sites and 3 others were previously on a FreeBSD machine and worked very well.

Possibilities I've considered:
1. Limitations of virtual machine -- kernel issues causing memory leaks
2. Something in one of the PHP CMSs is leaking memory -- unlikely since the sites worked fine on the FreeBSD machine.
3. Something in the apache configuration still needs to be tweaked.
4. Apache bug.

Any help or suggestions would be greatly appreciated.
__________________
WARTHOG: P-III 750, 576MB RAM | Server 8.04 | DNS, 24/7 bitTorrent, apt-cacher, svn
FALCON: Virtual machine | Zeon 2GHz | 256MB RAM | Server 8.04 | LAMP server
LIGHTNING: Virtual machine | Zeon 2GHz | 256MB RAM | Server 8.04 | apt-cacher, DNS, NTP

Last edited by davidshere; November 25th, 2008 at 05:19 PM..
davidshere is offline   Reply With Quote
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:35 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry