Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Member
    Join Date
    Feb 2009
    Posts
    12

    Default Something is eating memory

    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. #2
    Member
    Join Date
    Mar 2009
    Posts
    65

    Default

    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. #3
    Member
    Join Date
    Feb 2009
    Posts
    12

    Default

    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
    Last edited by rene123; 07-06-2009 at 02:15 PM.

  4. #4
    Member
    Join Date
    Mar 2009
    Posts
    65

    Default

    Quote Originally Posted by rene123 View Post
    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

    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. #5
    Member
    Join Date
    Feb 2009
    Posts
    12

    Default

    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. #6
    Member
    Join Date
    Mar 2009
    Posts
    65

    Default

    /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. #7
    Member
    Join Date
    Feb 2009
    Posts
    12

    Default

    I have Centos so I can't find any of these files...

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

  8. #8
    Member
    Join Date
    Feb 2009
    Posts
    12

    Default

    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. #9
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by rene123 View Post
    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?
    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. #10
    Member
    Join Date
    Mar 2009
    Posts
    65

    Default

    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.

Similar Threads & Tags
Similar threads

  1. Apache childs eating too much memory
    By fasdush in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 11-07-2007, 11:57 PM
  2. Apache eating up all memory
    By carock in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 04-04-2007, 03:59 AM
  3. MySQL eating memory... server overload
    By dazmanultra in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-23-2005, 09:37 AM
  4. spamd eating memory and cpu, load averages > 2
    By heath in forum cPanel and WHM Discussions
    Replies: 15
    Last Post: 08-15-2005, 09:23 AM
  5. 15-25+ of one process...eating memory..
    By Devil Inside in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 03-22-2004, 08:46 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube