MySQL full load at all times
-
- Posts: 2
- Joined: Sat Jul 11, 2015 8:20 am
MySQL full load at all times
Hello,
My name is Andrei, i'm a system administrator for a firm and in my spare time i juggle with linux and vesta panel so that i can host my website. The problem is that after some months of no problem at all with the vestapanel and the OpenVZ container, 2 or 3 sites that i host were infected with spamming ( wordpress ). I cleaned up everything to be ok, but after some days i began to see a full load on the MySQL server that was just hogging all the CPU ( 2 cores ) . at first i tought that it's a problem from a website that keept making queries and i disabled all the websites, but with no succes.
After that today i wanted to make a fresh new openVZ container and migrate everything, but after installing all the packages, i hit a htop -d 1 and i to my surprise, the full new container with no load on it was hitting the same problem with the MY SQL hogging all the CPU.
I will post some stats, maeby someone knows this problem and can help me ( us ) in case somebody hits the same situation.
Worst case i will have to move from vesta panel, and that would be a downer for me because i am confortable with the software and the easiness in working with it.
In mysql command line the server is showing a query to database NULL ?! ?! ?!
Id User Host db Command Time State Info
320 root localhost NULL Query 0 NULL SHOW PROCESSLIST
top - 11:47:00 up 2:17, 1 user, load average: 1.80, 1.86, 1.80
Tasks: 48 total, 1 running, 47 sleeping, 0 stopped, 0 zombie
Cpu(s): 84.5%us, 7.3%sy, 0.0%ni, 0.3%id, 0.0%wa, 0.0%hi, 0.0%si, 7.9%st
Mem: 1048576k total, 504336k used, 544240k free, 0k buffers
Swap: 1048576k total, 0k used, 1048576k free, 58036k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
957 mysql 20 0 633m 51m 6060 S 91.8 5.0 132:33.11 mysqld
1 root 20 0 19236 1080 848 S 0.0 0.1 0:00.02 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd/101
3 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khelper/101
26 root 20 0 104 16 4 S 0.0 0.0 0:00.09 init-logger
101 root 16 -4 10644 596 324 S 0.0 0.1 0:00.00 udevd
572 root 20 0 179m 1264 796 S 0.0 0.1 0:01.10 rsyslogd
591 named 20 0 156m 10m 1492 S 0.0 1.1 0:04.31 named
607 dbus 20 0 21436 740 500 S 0.0 0.1 0:00.00 dbus-daemon
622 root 20 0 66220 1204 496 S 0.0 0.1 0:00.00 sshd
630 root 20 0 21720 928 692 S 0.0 0.1 0:00.00 xinetd
641 root 20 0 52112 808 268 S 0.0 0.1 0:00.07 vsftpd
677 root 20 0 11308 1476 1184 S 0.0 0.1 0:00.02 mysqld_safe
997 root 20 0 19268 752 496 S 0.0 0.1 0:00.00 dovecot
1000 dovecot 20 0 12988 1060 856 S 0.0 0.1 0:00.00 anvil
1001 root 20 0 13116 1144 852 S 0.0 0.1 0:00.00 log
1010 root 20 0 66408 944 300 S 0.0 0.1 0:00.00 saslauthd
1012 root 20 0 66408 692 48 S 0.0 0.1 0:00.00 saslauthd
1024 exim 20 0 93256 1648 712 S 0.0 0.2 0:00.00 exim
1036 root 20 0 442m 18m 10m S 0.0 1.8 0:00.27 httpd
My name is Andrei, i'm a system administrator for a firm and in my spare time i juggle with linux and vesta panel so that i can host my website. The problem is that after some months of no problem at all with the vestapanel and the OpenVZ container, 2 or 3 sites that i host were infected with spamming ( wordpress ). I cleaned up everything to be ok, but after some days i began to see a full load on the MySQL server that was just hogging all the CPU ( 2 cores ) . at first i tought that it's a problem from a website that keept making queries and i disabled all the websites, but with no succes.
After that today i wanted to make a fresh new openVZ container and migrate everything, but after installing all the packages, i hit a htop -d 1 and i to my surprise, the full new container with no load on it was hitting the same problem with the MY SQL hogging all the CPU.
I will post some stats, maeby someone knows this problem and can help me ( us ) in case somebody hits the same situation.
Worst case i will have to move from vesta panel, and that would be a downer for me because i am confortable with the software and the easiness in working with it.
In mysql command line the server is showing a query to database NULL ?! ?! ?!
Id User Host db Command Time State Info
320 root localhost NULL Query 0 NULL SHOW PROCESSLIST
top - 11:47:00 up 2:17, 1 user, load average: 1.80, 1.86, 1.80
Tasks: 48 total, 1 running, 47 sleeping, 0 stopped, 0 zombie
Cpu(s): 84.5%us, 7.3%sy, 0.0%ni, 0.3%id, 0.0%wa, 0.0%hi, 0.0%si, 7.9%st
Mem: 1048576k total, 504336k used, 544240k free, 0k buffers
Swap: 1048576k total, 0k used, 1048576k free, 58036k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
957 mysql 20 0 633m 51m 6060 S 91.8 5.0 132:33.11 mysqld
1 root 20 0 19236 1080 848 S 0.0 0.1 0:00.02 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd/101
3 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khelper/101
26 root 20 0 104 16 4 S 0.0 0.0 0:00.09 init-logger
101 root 16 -4 10644 596 324 S 0.0 0.1 0:00.00 udevd
572 root 20 0 179m 1264 796 S 0.0 0.1 0:01.10 rsyslogd
591 named 20 0 156m 10m 1492 S 0.0 1.1 0:04.31 named
607 dbus 20 0 21436 740 500 S 0.0 0.1 0:00.00 dbus-daemon
622 root 20 0 66220 1204 496 S 0.0 0.1 0:00.00 sshd
630 root 20 0 21720 928 692 S 0.0 0.1 0:00.00 xinetd
641 root 20 0 52112 808 268 S 0.0 0.1 0:00.07 vsftpd
677 root 20 0 11308 1476 1184 S 0.0 0.1 0:00.02 mysqld_safe
997 root 20 0 19268 752 496 S 0.0 0.1 0:00.00 dovecot
1000 dovecot 20 0 12988 1060 856 S 0.0 0.1 0:00.00 anvil
1001 root 20 0 13116 1144 852 S 0.0 0.1 0:00.00 log
1010 root 20 0 66408 944 300 S 0.0 0.1 0:00.00 saslauthd
1012 root 20 0 66408 692 48 S 0.0 0.1 0:00.00 saslauthd
1024 exim 20 0 93256 1648 712 S 0.0 0.2 0:00.00 exim
1036 root 20 0 442m 18m 10m S 0.0 1.8 0:00.27 httpd
-
- Collaborator
- Posts: 783
- Joined: Mon May 11, 2015 8:43 am
- Contact:
- Os: CentOS 6x
- Web: apache + nginx
Re: MySQL full load at all times
check mysql log
-
- Posts: 2
- Joined: Sat Jul 11, 2015 8:20 am
Re: MySQL full load at all times
My SQL log is ok.tjebbeke wrote:check mysql log
I found out what was making my VPS go crazy : first of all it wasn't VESTACP fault !
Second of all, for all who might use OpenVZ for webhosting, please be sure to have if you use OpenVZ the Proxmox VE 3.1 AT LEAST !
The thing is that the server is Proxmox VE 2.1 so that if something went wrong then the server started to crumble because of the old version. If i moved the tar archive to a new Proxmox VE 3.3 server the OpenVZ container was "quiet" and didn't make any CPU usage.
So to remember, PROXMOX VE 3.1 at minimum for no problems.
Re: MySQL full load at all times
It's in over 9000 cases true ;-)first of all it wasn't VESTACP fault !