Results 1 to 6 of 6

Thread: apache stops responding after a few days

Threaded View

  1. #1
    Join Date
    Aug 2006
    Beans
    233

    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.
    Last edited by davidshere; November 25th, 2008 at 10:19 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •