Submitted by h4ns3n on Fri, 09/09/2016 - 09:02 Pro Licensee
Good day,
I require support for a VPS that is intermittently failing (becoming more frequest - at least 10 times per day) . All virtual servers (guest hosts) fail with the error "Unable to establish a database connection".
I am running a VPS on OpenVZ, however, I am monitoring resource usage and the server resources are not beyond 10%. Memory, CPU HDD
Would appreciate support on this issue. Please advise what log files you require?
Status:
Active
Comments
Submitted by andreychek on Fri, 09/09/2016 - 09:36 Comment #1
Howdy -- what is the output of the commands "dmesg | tail -50" and "free -m" on your server?
Also, can you paste in the contents of the /proc/user_beancounters file?
Lastly -- how are you fixing the issue with MySQL once it starts occurring?
Submitted by h4ns3n on Sat, 09/10/2016 - 11:17 Pro Licensee Comment #2
Resolved the problem by following the advice here:
http://www.blogtips.org/block-wordpress-brute-force-attacks-via-xmlrpc-php/
I added the following to .htaccess
# BEGIN protect xmlrpc.php
<files xmlrpc.php>
order allow,deny
deny from all
</files>
# END protect xmlrpc.php
Was probably script kiddies playing games.
Submitted by h4ns3n on Sat, 09/10/2016 - 11:18 Pro Licensee Comment #3
Interesting though that an xmlrpc attack on one virtual server could take my entire VPS down.
Submitted by andreychek on Sat, 09/10/2016 - 13:18 Comment #4
Glad you got it working!
Depending on how hard your server was being hit, some sort of VPS resource threshold may have been crossed that was causing MySQL to go offline.
It also could have reached the maximum MySQL connections allowed.