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.

Something causing high load

Discussion in 'General Discussion' started by hm2k, Jun 29, 2007.

  1. hm2k

    hm2k Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    A site or something we have on our server is causing high load.

    Sometimes httpd is high load, sometimes php is, sometimes mysql...

    /var/log/messages seems clean...

    I'm trying to work out where the problem may lie...

    Where can I begin to look to investigate which site might be causing the high load?

    Which site might be causing mysql to overload?

    Thanks.
     
  2. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Read this article to learn more about the cause of server high load:
    http://servertune.com/kbase/entry/67/
     
  3. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Hi,

    You need to monitor your server when the load is high. execute the below commands:

    ps -auxf
    netstat -alntp
    watch mysqladmin proc

    Also executing the command:

    lynx http://localhost/whm-server-status

    will give you a nice idea as which domain is having maximum of conncetions. You can then check the domlogs for that domain located at /usr/local/apache/domlogs/domainname using the

    tail -f

    command. If any IP is causing problems, you can block it using iptables. If any website is having most number of connections and they are legal which are cauing problems, then you should suspend the account and infrom the client.

    You can also take the output of the above 3 commands when the load is high and paste in here. People will have a better idea as what is causing high load on your server.
     
  4. hm2k

    hm2k Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    Thanks for the responses, i've been monitoring this situation for a while before I replied.

    With regards to your messages...

    http://servertune.com/kbase/entry/67/ -> This does not answer my question, I was already aware of this information.

    ps -auxf -> I usually use "top" instead to investigate where the load is.

    Using top, I found it's usually it's the httpd or mysql, that's been running for a long prolonged period of time, which can be fixed by killing the process, and sometimes restarting the service. But doing this i'm unable to find where the problem lies. Other times, there will simply be no single high load application, and ps aux doesn't show multiple services.

    netstat -alntp -> This is useful as it shows the connection and the PID, but not the user or site, so quite limited really.

    watch mysqladmin proc -> looks funky, but only shows root and leechprotect, so... I dunno if this is any use.

    whm-server-status -> this is useful, but i've only just enabled access for my remote IP so will be monitoring it carefully.

    /usr/local/apache/domlogs/domainname -> This is only useful if I know which domain is causing the problem... Perhaps I need to monitor the dir for changes some how?

    tail -f -> I use this on /var/log/messages, which often helps...

    Any further advise on how to identify a possible problematic domain/user?
     
  5. hm2k

    hm2k Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    *bump*

    Any further advise on how to identify a possible problematic domain/user?
     
  6. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Yes, use phpsuexec/suexec, so you can tell from process ownership who the problematic user is.
     
  7. hm2k

    hm2k Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    Sounds too easy... Doesn't this add some kind of complication?
     
  8. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    Are you certain you are not running out of memory and doing alot of swapping?. Often when you have high loads that seem to change from different programs or different users running things but then the same things dont cause high load at other times it's quite likely to be swapping to disk that really bogs everything down.

    Check the memory usage/status every time you see high loads and if you see anything, post it here. BTW - how much memory does your machine have ?
     
  9. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    There are definitely things to be aware of if you go this route. There is some preparation to do first. Search these forums for preparing for phpsuexec before you do it.
     
  10. hm2k

    hm2k Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    It's a VPS.

    root@server [~]# cat /proc/meminfo
    MemTotal: 2071080 kB
    MemFree: 1663160 kB

    I found some information here:
    http://www.cpanel.net/security/commontips.htm
    Is there any further advice you can provide me with?

    Note: Excuse the delayed reply, it's not really been much of a problem until recently.
     
  11. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Unfortunately, much of the advice in this thread may be out of date with EasyApache 3. For example, we no longer use phpSuExec. We now use SuPHP. You can find EasyApache 3 documentation on our website at:

    http://www.cpanel.net/support/docs/ea/ea3/
     
  12. hm2k

    hm2k Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    I had actually spotted that, i'm just in the process of recompiling apache with SuPHP, so hopefully this may help me locate the problem.

    However, I understand this isn't the be all and end all of solving this issue.

    Perhaps as a cPanel expert you could provide me with more detailed ways of what to monitor during high load to locate the cause.

    That would be much appreciated.
     
Loading...

Share This Page