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 causing high loads

Discussion in 'EasyApache' started by Jinxey, Nov 7, 2007.

  1. Jinxey

    Jinxey Member

    Joined:
    Jan 18, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hi there,

    Excuse me if I ask any Noobish questions, however im not as experienced as Id like to think, however I do think I have quite a serious problem. Occasionly the server loads are going rocket high, when i view the CPU usage, most of these are Apache processes such as...

    11161 nobody 0 8.8 1.3 /usr/local/apache/bin/httpd -DSSL
    11132 nobody 0 8.2 0.8 /usr/local/apache/bin/httpd -DSSL
    11137 nobody 0 3.6 0.8 /usr/local/apache/bin/httpd -DSSL

    I don't believe those ones are that bad, however some apache processes occasionly rocket up to about 40.. I also look at the average 24 Hour figures, however I don't seem to get them that much. When i do a tracelog I can see a few things that are apparently causing it, however when I ask clients nicely to try and remove them, Im not really seeing a great difference. Im not sure if im just not looking or undertanding them correctly or what... Heres an example of a few of the Average CPU Usage...

    eoradioc eoradio.co.uk 6.11 15.53 35.4
    Top Process %CPU 16.1 httpd [domain [/shoutbox.php]
    Top Process %CPU 13.2 httpd [domain] [/scripts/panel/style_public.css]
    Top Process %CPU 12.0 httpd [domain] [/stats.php]
    habmadn domain2 4.77 0.22 0.3
    Top Process %CPU 44.0 php -q cron.php
    Top Process %CPU 41.0 php -q cron.php
    Top Process %CPU 40.0 php -q cron.php
    kevinb domain3 3.49 13.06 0.9
    Top Process %CPU 40.0 /usr/local/cpanel/cpanel ./frontend/x/files/trashit.html
    Top Process %CPU 7.6 httpd [domain3] [/topsites/button.php?usssadf]
    Top Process %CPU 5.4 httpd [domain3] [/v4/miscpages/radio_stats.php]
    tom2 domain4 3.05 7.62 31.2
    Top Process %CPU 69.0 gzip -f -
    Top Process %CPU 14.8 httpd [domain4] [/shoutbox/]
    Top Process %CPU 7.0 cpanellogd - archiving logs for tom2


    I notice the cron jobs are of quite high load, however the overall for the account doesnt seem to bad?

    Anyone know what I should do? Im totally stumped as im not that experienced? Is it this that is causing such high loads or is there something else I should be checking?

    The loads can vary from around a reasonably healthy 1.37-19.76 (sometimes higher) during peak times. It doesn't go that high often however it can shoot up to around 10.00 and back down slowly. I relealise this is more of a processor issue, however would purchasing more Ram for the server relax the load?

    Ta for any help, It is much appreciated :)
     
  2. Jinxey

    Jinxey Member

    Joined:
    Jan 18, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Any help please?
     
  3. prasul

    prasul Registered

    Joined:
    Oct 4, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Air you breathe
    Hi,

    Interesting scenario. But you will want to use the netstat command which is quite effective and you can choose from the ports you want to filter. You can check for the sites connecting through.

    The next option is via your WHM, just check apache status and see for yourself on the sites that are active during high loads. This should help you concentrate your investigation with a restricted number of sites. So that will do the best.

    :eek:
     
  4. Jinxey

    Jinxey Member

    Joined:
    Jan 18, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    Thanks for your reply. Thanks for the advice, I didn't realise I could view the sites status via the Apache status, silly me. Ive had a look, however as far as I can see none of them seem to be causing a really high load, or do all these loads add up to create the server load on a whole? Im not sure im really even reading this right!

    Actually... on closer inspection, when the load was about quite high in about 3-4.... i see the following...

    http://img146.imageshack.us/img146/289/cpanelimagesq2.png

    Would these be the sites that are causing the problems?
     
  5. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Did you stop Apache to see if the load would drop? Run this command and see if your server is under attack:

    /bin/netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr
     
  6. Jinxey

    Jinxey Member

    Joined:
    Jan 18, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    When running that, it comes up with Command not found? Probably my error though.. will try again in a minuite.

    I didn't really stop apache, however when I restart apache via WHM, it reduces the memory, but not so much the load. Im not really sure how to stop apache to be honest, as im not really that experience with shell etc.
     
  7. WebHostDog

    WebHostDog Well-Known Member

    Joined:
    Sep 3, 2006
    Messages:
    144
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Website Owner
    any way to trace / calculate how much's CPU every user is using ?


    Thanks,
     
Loading...

Share This Page