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.

High Load On server.

Discussion in 'General Discussion' started by avinashsiva21, Dec 5, 2010.

  1. avinashsiva21

    avinashsiva21 Member

    Joined:
    Nov 6, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    My dedicated cpanel server always stays at high loads.
    Tried out many tweak setting but notihing is effective. Also domains (all 5 of them) are loading really slow.


    Including processing details

    top - 06:17:44 up 10 days, 13:30, 2 users, load average: 0.55, 1.44, 1.97
    Tasks: 300 total, 1 running, 298 sleeping, 0 stopped, 1 zombie
    Cpu(s): 5.9%us, 0.3%sy, 0.0%ni, 93.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
    Mem: 12291148k total, 3529200k used, 8761948k free, 24016k buffers
    Swap: 2096472k total, 69424k used, 2027048k free, 362828k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    18635 nobody 15 0 172m 12m 3512 S 4.0 0.1 0:00.41 /usr/local/apache/bin/httpd -k restart -DSSL
    17946 nobody 15 0 199m 40m 4040 S 3.7 0.3 0:01.87 /usr/local/apache/bin/httpd -k restart -DSSL
     
    #1 avinashsiva21, Dec 5, 2010
    Last edited: Dec 6, 2010
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    that's not a high server load :confused:
     
  3. avinashsiva21

    avinashsiva21 Member

    Joined:
    Nov 6, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hi Everyone,

    I have a dedicated server which has 8core processors,12gb of RAM and 120Gb hdd. It has 8 domain running on the server with cpanel as the control panel.

    However the domains are loading very slow and server load seems to be below 5. I could see the database connection are getting higher when the site goes laggy and free memory goes below 100 within seconds. I tried to tweak mysql and drop the server cache periodically to free up the memory. But it doesn't look good as the main db connection are often getting high no of connections and it is returning db errors if i try to reduce the db connection in my.cnf. Can someone have any idea to limit the memory usage and increase the site performance?

    Thank you.
     
    #3 avinashsiva21, Dec 6, 2010
    Last edited: Dec 6, 2010
  4. GaryT

    GaryT Well-Known Member

    Joined:
    May 19, 2010
    Messages:
    321
    Likes Received:
    3
    Trophy Points:
    16
    In ssh what are the output of:

    Run this when your site goes "Laggy"
     
  5. avinashsiva21

    avinashsiva21 Member

    Joined:
    Nov 6, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hi GaryT,

    Thank you for your reply..

    Here is the results:
    Total no of connection to port 80 is:
    1070
    And more than 300 IP's are connecting to the main site at this particular time.

    So 300 IP's creating above 1000 connections..
     
  6. linux7802

    linux7802 Well-Known Member

    Joined:
    Dec 14, 2007
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    You can block ip's by using following command in server which creating large number of connection to your server to resolve load issue.

    route add ip reject

    To check which ip having large number of connection to your server refer following command

    netstat -anp | grep :80 | awk '{print $5}'| cut -d : -f 1 | sort | uniq -c | sort -n
     
    #6 linux7802, Dec 6, 2010
    Last edited: Dec 6, 2010
  7. avinashsiva21

    avinashsiva21 Member

    Joined:
    Nov 6, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hi

    The maximum hit on the server is 19
    netstat -anp | grep :80 | awk '{print $5}'| cut -d : -f 1 | sort | uniq -c | sort -n

    My process shows a large no of httpd service run nobody. This is consuming high load and sites are tooo slow to load!!!!!

    18616 nobody 16 0 213m 54m 4120 S 5.8 0.5 0:01.10 /usr/local/apache/bin/httpd -k start -DSSL
    16853 nobody 15 0 216m 57m 4148 R 1.9 0.5 0:07.97 /usr/local/apache/bin/httpd -k start -DSSL
    18497 nobody 15 0 212m 53m 4096 S 1.9 0.4 0:01.43 /usr/local/apache/bin/httpd -k start -DSSL
    19412 nobody 15 0 212m 53m 4084 S 1.9 0.4 0:01.35 /usr/local/apache/bin/httpd -k start -DSSL

    Any advice......
     
  8. linux7802

    linux7802 Well-Known Member

    Joined:
    Dec 14, 2007
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    As most of the process running under nobody user, there for you can't found out exact hosting account which is causing the problem. I would like to recommend you please enable suexec on your server, so that all process will run under the respective users which will help you to found out exact hosting account which is causing the high load issue.

    Check following URL to understand SuExec.
     
  9. dynaweb

    dynaweb Well-Known Member

    Joined:
    May 14, 2003
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Oregon
    Suexec is not entirely necessary. Once you discover which specific IP is hogging all the connections, you can run the following to find which domain/page/script is the source of the trouble.

    Code:
    grep [ipaddresshere] /usr/local/apache/domlogs/*/*
     
Loading...

Share This Page