Have had a really strange problem, mysql dies after a few seconds without logging anything, it just stops. After some investigations, upgrading the database and tuning I found that it was not a problem with the database, the database seemed to get an unusual high amount of traffic. After looking in my apache logs I found a lot of these rows:
184.108.40.206 - - [28/Sep/2016:09:36:16 +0200] "POST /xmlrpc.php HTTP/1.0" 200 596 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
It turns out that my site was being subjected to a brute force attack that targeted the WordPress xmlrpc.php file.
I fixed it by blocking the ip’s in the firewall
iptables -A INPUT -s 220.127.116.11 -j DROP
And checking the stats for the input chain showed that there was a lot of traffic coming in, and is now dropped.
iptables -L INPUT -v -n Chain INPUT (policy ACCEPT 1133 packets, 431K bytes) pkts bytes target prot opt in out source destination 0 0 DROP all -- * * 18.104.22.168 0.0.0.0/0 4708 282K DROP all -- * * 22.214.171.124 0.0.0.0/0 1739 102K DROP all -- * * 126.96.36.199 0.0.0.0/0 785 47272 DROP all -- * * 188.8.131.52 0.0.0.0/0
It seems to have fixed the problem for now.