Skip to main content

100% of SWAP used, MySQL is cause, what to do?

Comments

5 comments

  • mageshm
    Hi, I need few details from you to understand the root causes of issue. 1) From top -c command, what is your output and which process is consuming more RAM & CPU utilization (like any particular DB or entire MySQL or anyother services) 2) Use the below command to check MySQL activity, some time you will face this kind of issues, if the DB using JOIN or COPY query. Also verify how long the query is running. root@xxx [~]# watch -n1 mysqladmin proc stat or root@xxx [~]# watch -n 1 mysqladmin processlist
    0
  • postcd
    @mageshm 1) top -c most processes are in maximum several hundreds of megabytes VIRT memory. Following process using around 5,6GB VIRT mysql 901 8.7 23.3 5755996 4187488 ? Sl 09:15 45:04 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/my.fqdn.hostname.err --open-files-limit=43762 --pid-file=/var/lib/mysql/my.fqdn.hostname.pid 2) there do not seems to be much slow queries, these are processes that are sitting there some seconds: | 162 | eximstats | localhost | eximstats | Sleep | 164 | | | | 2737 | root | localhost | | Sleep | 108 | | | | 34727 | modsec | localhost | modsec | Sleep | 1192 | | | | 120004 | leechprotect | localhost | leechprotect | Sleep | 13129 | | | | 206390 | root | localhost | | Query | 0 | | show processlist | +--------+---------------+-----------+---------------+---------+-------+-------+------------------+
    0
  • mageshm
    I'm not getting anything from top-c output, can you please take a screenshot and share with me if its possible. Also have a look into MySQL error log file which will help you to get some details.
    0
  • postcd
    i will not share my top -c output. i dont have mysql error log in /var/log, only slow_log and nothing strange in it. Anyone else please can help with some ideas on how to debug this please? Thank you
    0
  • cPanelMichael
    Hello :) You may need to consult with a qualified system administrator if the existing changes you have made based on a MySQL tuner have not helped. Thank you.
    0

Please sign in to leave a comment.