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 is eating memory

Discussion in 'General Discussion' started by rene123, Jul 6, 2009.

  1. rene123

    rene123 Active Member

    Joined:
    Feb 20, 2009
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Server Load 2.31 (2 cpus)
    Memory Used 83.1 %
    Swap Used 51.81 %
    Disk /dev/sda1 (/) 20 %

    2gb memory, dual-core. Something is taking all the memory, and I don't know how to find the leak. Any leads? It comes and goes, so it's not always overloaded.
     
  2. robbie_troster

    robbie_troster Well-Known Member

    Joined:
    Mar 26, 2009
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Best thing to do is use the 'top' command in SSH and then press c to see the command line.

    Look at the VIRT section where the ram usage is shown.
     
  3. rene123

    rene123 Active Member

    Joined:
    Feb 20, 2009
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Ok, something at least...
    19486 mysql 15 0 141m 24m 3692 S 50.2 1.2 10750:36 mysqld
    1461 nobody 15 0 12676 3112 1528 S 0.7 0.2 0:00.07 httpd
    2824 nobody 15 0 12944 3200 1536 S 0.7 0.2 0:00.16 httpd
    2868 nobody 16 0 12804 3168 1532 S 0.7 0.2 0:00.32 httpd
    6137 kim 16 0 17456 6488 4448 S 0.7 0.3 0:00.02 php5
    2158 nobody 16 0 12676 3072 1528 S 0.3 0.1 0:00.06 httpd
    2986 nobody 16 0 12676 2920 1532 S 0.3 0.1 0:00.06 httpd
    2990 nobody 15 0 12540 2840 1520 S 0.3 0.1 0:00.03 httpd
    5132 nobody 15 0 12676 2948 1520 S 0.3 0.1 0:00.01 httpd
    5177 nobody 15 0 12540 2844 1520 S 0.3 0.1 0:00.03 httpd
    5642 nobody 16 0 12540 2828 1528 S 0.3 0.1 0:00.01 http

    Todays CPU Usage
    Top Process %CPU 47.6 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/cpanel.example.net.pid --skip-external-locking
    Top Process %CPU 47.5 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/cpanel.example.net.pid --skip-external-locking
    Top Process %CPU 47.4 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/cpanel.example.net.pid --skip-external-locking
     
    #3 rene123, Jul 6, 2009
    Last edited: Jul 6, 2009
  4. robbie_troster

    robbie_troster Well-Known Member

    Joined:
    Mar 26, 2009
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6

    There doesn't seem to be much of a problem there....

    Kim looks a bit powerful however... and something is using mysql quite a lot. Mine only uses abotu 50m yours is using 141m
     
  5. rene123

    rene123 Active Member

    Joined:
    Feb 20, 2009
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Kim has a big site, around 3-5k visitors a day. But it should not be a problem...

    Is there any log file for mysql I can dig into?
     
  6. robbie_troster

    robbie_troster Well-Known Member

    Joined:
    Mar 26, 2009
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    /var/lib/mysql/$(hostname).err

    This path could vary, but is generally located in /var/lib/mysql. Could also be located at /var/log/mysqld.log
     
  7. rene123

    rene123 Active Member

    Joined:
    Feb 20, 2009
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    I have Centos so I can't find any of these files...

    Checked the apache log but the seems to nothing strange there.
     
  8. rene123

    rene123 Active Member

    Joined:
    Feb 20, 2009
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Ok, found something in "Show Current CPU Usage". It's for the big sites account, and is taking 60% of all resources as it seems:

    /usr/local/cpanel/3rdparty/bin/analog +CIMAGEDIR /images/ +CDOMAINSFILE /usr/local/cpanel/3rdparty/share/analog/lang/usdom.tab +CCHARTDIR ./ +CALLCHART ON +CLANGFILE /usr/local/cpanel/3rdparty/share/analog/lang/us.lng +COUTFILE /home/kim/tmp/analog/example.kim.example.net/7.html +CLOCALCHARTDIR /home/kim/tmp/analog/example.kim.example.net/ +CCACHEOUTFILE /home/kim/tmp/analog/example.kim.example.net/cache.out +CCACHEFILE /home/kim/tmp/analog/example.kim.example.net/cache +CVHOST ON +COSREP ON +CBROWSER ON +CFULLBROWSER ON +CREDIRREF ON +CREFSITE ON +CFAILREF ON +CLOGFORMAT COMBINED +CHOSTNAME example.kim.example.net +CHOSTURL http://example.kim.example.net/ /usr/local/apache/domlogs/example.kim.example.net

    Killed this process and everything went back to normal. So this process is the problem. Now the question is how to stop it from happening again. Tried to disable it under "Statistics Software Configuration", but it seems to be running anyway.

    Is it enough to deselect "Enabled by Default" and "Active" on all Statistic Softwares under "Statistics Software Configuration" to disable all Statistic?
     
  9. 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
    That should be sufficient to disable stats generation, but any remaining stats processes may still be running to conclude whatever they were working on.
     
  10. robbie_troster

    robbie_troster Well-Known Member

    Joined:
    Mar 26, 2009
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Analog stats should not be using anywhere near that amount of resources. Normally about 0.1%CPU.

    Try disabling the analog, update the cPanel, re-enable it, and see what happens.
     
Loading...

Share This Page