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.

too many connections = high server load

Discussion in 'Workarounds and Optimization' started by SamiBH, Nov 3, 2011.

  1. SamiBH

    SamiBH Member

    Joined:
    Jul 20, 2010
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I need your help pls.

    I have small php forum

    for a week now I get high server load ( load average: 3.25, 2.95, 2.93 )

    when I do :

    Code:
    netstat -anp | grep 80 | awk '{print $5}' | cut -f1 -d: | sort | uniq -c | sort -n

    I get this

    11-3-2011 11-53-56 PM.jpg

    is this normel? ( 22 41.178.237.174 )

    .................

    my vps :
    Shared Dual Quad Core CPU / 75 GB HDD / 750 GB Bandwidth / 512 MB Memory (2048 MB Burstable)

    httpd.conf:
    Code:
    MinSpareServers 5
    MaxSpareServers 5
    </IfModule>
    ServerLimit 256
    MaxClients 150
    MaxRequestsPerChild 10000
    KeepAlive On
    KeepAliveTimeout 5
    MaxKeepAliveRequests 100

    my.cnf:
    Code:
    [mysqld]
    skip-innodb
    max_connections=300
    connect_timeout=15
    query_cache_type=1
    query_cache_size=32M
    query_cache_limit=1M
    sort_buffer_size=2M
    read_rnd_buffer_size=512K
    tmp_table_size=32M
    max_heap_table_size=32M
    thread_cache_size=24
    key_buffer_size=16M
    table_cache=256
    join_buffer_size=1M
    log-slow-queries=/var/lib/mysql/slow.log
    if you can help, I will be more than grateful

    thank you,
     
    #1 SamiBH, Nov 3, 2011
    Last edited: Nov 3, 2011
  2. gnutoolbox

    gnutoolbox Member

    Joined:
    Sep 25, 2011
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Netstat output looks normal, Can you paste the ' top -c ' command output here?
     
  3. milind

    milind Well-Known Member

    Joined:
    Jan 15, 2006
    Messages:
    113
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Nasik (Maharashtra), India
    cPanel Access Level:
    Root Administrator
    Hello SamiBH,

    Yes, 22 connections look normal but is this creating heavy load on your server. Let us know the output of top command so we can assist you in a better way.
     
  4. SamiBH

    SamiBH Member

    Joined:
    Jul 20, 2010
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Could you check WHM > Daily Process Logs to see if any top processes show for any user that are showing high CPU usage? Also, what is the memory and CPU usage for the top-most using account on the machine in that area?
     
  6. SamiBH

    SamiBH Member

    Joined:
    Jul 20, 2010
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    it's VPS and I only have my site on it

    and the hosting company just told me that I have until December 1s to fix the cpu load or they will have to close my account

    pls if any one can help me fix the high load

    thank you
     
  7. storminternet

    storminternet Well-Known Member

    Joined:
    Nov 2, 2011
    Messages:
    462
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    top output is showing that mysql is consuming almost 59% cpu resources of your vps. So anyhow databases (may be forum database) overloading your server.
    Type mysqladmin pr to find out running databases processes. It will give you idea that which database , sql queries are overloading your vps.
     
Loading...

Share This Page