Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member carock's Avatar
    Join Date
    Sep 2002
    Location
    St. Charles, MO
    Posts
    215

    Default Apache eating up all memory

    Anyone know how I can figure out why Apache is eating up all my server memory?

    The server crashed last night from using up all the swap space and free memory.

    After restart this morning, I'm trying to figure out what is using all that swap.

    I did a top and sorted by VIRT mem to find this....

    Swap: 1020088k total, 879068k used, 141020k free, 1010676k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    12115 nobody 25 0 715m 648m 2292 S 0 16.7 0:45.41 httpd
    4697 nobody 17 0 716m 425m 3556 S 0 11.0 1:20.09 httpd
    5931 nobody 17 0 715m 366m 3644 S 0 9.4 1:18.60 httpd
    27179 nobody 15 0 517m 315m 3088 S 0 8.1 1:34.47 httpd



    715 meg per process???

    The only addon I have is the Apache mod_bwlimited. I guess I could try removing that to see if it helps. I've had it installed for a month or so now though without this problem.

    Thanks,
    Chuck
    Last edited by carock; 04-03-2007 at 12:31 PM.

  2. #2
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,170
    cPanel/Enkompass Access Level

    Root Administrator

    Question

    Have you tried the link in WHM titled: Modify Apache Memory Usage

  3. #3
    Member carock's Avatar
    Join Date
    Sep 2002
    Location
    St. Charles, MO
    Posts
    215

    Default

    I've done that once or twice since the server was originally set up.

    Is that something that needs to be done each time I upgrade apache or something?

    I ended up killing those Apache child processes, but I could not find any way to tell what activated them, or which site they were serving. All the other Apache children were 17meg or so resident memory usage.

    So far they haven't returned. I'm wondering if they aren't triggered by some kind of programming loop in a php script or something???

    Thanks,
    Chuck

  4. #4
    cPanel Partner NOC cPanel Partner NOC Badge AndyReed's Avatar
    Join Date
    May 2004
    Location
    Minneapolis, MN
    Posts
    2,223

    Default

    Quote Originally Posted by carock View Post
    Anyone know how I can figure out why Apache is eating up all my server memory?

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    12115 nobody 25 0 715m 648m 2292 S 0 16.7 0:45.41 httpd
    This command should help in finding who is exahusting your Apache resources:
    /bin/grep $(lsof -p PID | grep cwd | awk '{print $9}' | awk -F '/' '{ print $3 }') /etc/userdomains
    Andy Reed
    RHCE and CCNA
    ServerTune.com

  5. #5
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Which version of PHP are you running? If witnessed a memory leak in v4.4.6 which was cured by downgrading to v4.4.4 - though of course, this opens up security issues, though v4.4.6 has holes in it too. Might be worth a try.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

Similar Threads & Tags
Similar threads

  1. Something is eating memory
    By rene123 in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 07-10-2009, 06:23 PM
  2. Apache eating a lot of memory and high Cpu load
    By parsmatix in forum New User Questions
    Replies: 1
    Last Post: 05-26-2008, 08:55 PM
  3. Apache childs eating too much memory
    By fasdush in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 11-08-2007, 12:57 AM
  4. MySQL eating memory... server overload
    By dazmanultra in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-23-2005, 10:37 AM
  5. 15-25+ of one process...eating memory..
    By Devil Inside in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 03-22-2004, 09:46 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube