The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Apache eating up all memory

Discussion in 'EasyApache' started by carock, Apr 3, 2007.

  1. carock

    carock Well-Known Member

    Joined:
    Sep 25, 2002
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    St. Charles, MO
    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
     
    #1 carock, Apr 3, 2007
    Last edited: Apr 3, 2007
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,461
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Have you tried the link in WHM titled: Modify Apache Memory Usage
     
  3. carock

    carock Well-Known Member

    Joined:
    Sep 25, 2002
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    St. Charles, MO
    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. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    This command should help in finding who is exahusting your Apache resources:
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    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.
     
Loading...

Share This Page