EDIT: If you’re fairly certain you’re not suffering from an xml-rpc attack, check out our article about debugging Wordpress database errors.
EDIT: We now have a community article covering xml-rpc attacks!
Hey there,
As @nestchris said, we have started seeing an influx of brute-force amplification attacks, both on our service and the rest of the internet at large. These attacks exploit the XML-RPC functionality in WordPress, as described on Securi.net
You can see if you are being taken down by this attack by running one of the following two commands on your droplet, depending on which webserver you’re running:
Apache:
grep xmlrpc /var/log/apache2/access.log
Nginx:
grep xmlrpc /var/log/nginx/access.log
If you get any results there, it should be easy to fix this issue. If you’ve spun up a WordPress One-Click install droplet since Dec 2015, there’s a small config file which you can enable to block such attacks. We don’t enable it by default because it breaks some commonly used plugins (like Jetpack). Here are the commands you can run:
sudo a2enconf block-xmlrpc
sudo service apache2 restart
Alternatively, Jetpack has functionality to block these requests without impacting other plugins. Check out their Protect module.
If you’re running a WordPress droplet older than Dec 2015 and you don’t want to use the Jetpack plugin from Automattic, you’ll need to configure the droplet manually to block requests to xmlrpc.php:
Apache2 (goes inside your VirtualHost config):
<files xmlrpc.php>
order allow,deny
deny from all
</files>
Nginx (goes inside your server{} block):
location /xmlrpc.php {
deny all;
}
Alternatively, if you are not having this issue due to an XML-RPC brute force attack, your Droplet might not have enough memory to deal with your traffic reliably. We recommend users run WordPress on a 1GB droplet or larger.
In order to help reduce your memory usage, you’d first want to check for any plugins using a large amount of memory. There are a lot of memory hungry plugins out there! You may also want to optimize your configuration files.
Below are some great resources that we commonly recommend in support tickets, explaining how to do so, depending on your setup:
Apache:
https://www.digitalocean.com/community/tutorials/how-to-optimize-apache-web-server-performance
https://github.com/gusmaskowitz/apachebuddy.pl
Nginx/php-fpm:
https://www.digitalocean.com/community/tutorials/how-to-optimize-nginx-configuration
http://blog.chrismeller.com/configuring-and-optimizing-php-fpm-and-nginx-on-ubuntu-or-debian
MySQL:
http://mysqltuner.com/
http://www.percona.com/blog/2014/01/24/mysql-server-memory-usage-2/
If none of this works, you may have no choice but to resize to a larger sized droplet that can handle your traffic.
Best,
Eris
Platform Support Specialist
We have about 20 accounts on DigitalOcean and over the past two months ALL OF THEM have been experiencing this issue, even on droplets with 4GB RAM. We’re migrating all of our sites elsewhere…
I have the same problem as well. I often restart the server but each time I restart, same thing happen the next day and this is happening 50% of my websites on DigitalOcean. I do have website hosting elsewhere and they works perfectly fine with lower monthly cost.
I’m moving all my websites elsewhere as well. It’s just ridiculous.
I have also experiences this issue over the last week. Does anyone have any idea what might cause this? Anyone got some alternative places to host?
Same issue for me! Glad I am no the only one.. i tried swap files and editing wp-config, but no help
Same issue here. While the DigitalOcean team has been very helpful, I just can’t get this site to function properly. I am going to have to migrate as well.
am having the same issue now. seems this is a problem on Digital Ocean. restarting the mysql helped for now but I hope there is a more permanent solution.
Having the same issues here too. The server was stable, this just started happening.
Same issue here for about the past week on both of mine. One is even a brand new install
same issue here and it is getting annoying to say the least. Now I know this is a problem with many droplets not just mine.
Similar issue, have tried the above recommendation but the issue still persists, is there an alternative solution ?
Same issue with 2GB on multiple sites with very little traffic every 2-3 days, only happens on Digital Ocean and just too much hassle for what its worth, moving sites elsewhere.
same here on its own droplet…
Same issue here! my both sites are down.
Same problem. Started a couple of days ago. Wordpress site.
ya, I have 3 dropplets, and this is only happening on one, the one with the lowest load, all 3 are 1gig, all three are wordpress, all 3 droplets are in new york 3. this is the only droplet that is not wordpress multisite, the others are.
Same issue started a few weeks back. Upgrade to 2GB RAM hoping the problem would go away. No, it came again today. Have to restart mysqld. Very ignoring and can lose customers. It’s just a single WP site. Any solution?
Me too. MySQL restart works fine but I’m not really up for dropping into my websites every day to see if they’re still working.
I am in the same boat as well. Digital Ocean has to have something to say on the matter. I REALLY don’t want to migrate my site but like you all will be left with no other choice.
Can anyone else confirm whether the addition of swap (according to @kamaln7’s suggestion) resolves the problem?
Currently I’m seeing this occur about once a week on my 1 GB RAM / Ubuntu 14.04 instance.
Same here with WP on 1GB / Ubuntu 14.04.
Things I’ve tried that had no effect (site never changes from DB error message)
Waiting on support for ideas.
I have same happened two time in last couple days, it was working flawless until two days ago !
It has happened to me on at least two occasions in the last week or so. Have to say that I hadn’t had that issue when I was with Ramnode.
Same for me, have a simple standard wordpress and woocommerce running, in the mean time on a 4 GB ram droplet and after 1-3h it shuts down with that database error. I don’t know what i’m paying for and support sends me links to caching community do it yourself pages - just annoying - I was very happy with digital ocean so far
Same problem here on both of my sites!! Will be migrating my sites to another provider and closing my D.O account tomorrow.
Same problem for me, since a couple of days … I will close my account too il nothing is done by the digital ocean team…
The fact that DO isn’t on threads like this helping people or making public statements about something that is so clearly not working is a huge turn off. I really enjoyed using their servers for Python web apps, but I’ll be shortly migrating everything somewhere else. I’d honestly rather give my money to godaddy at this point since my sites at least worked there.
Same over here. I’m opening support tickets and receiving bullshit answers. Nobody at DO seems to be aware of this issue.
Having the same issue here. Using Ubuntu WordPress on 14.04 which only has admin traffic and isn’t launched yet. MySQL is now crashing every 24 hours. Come on DO. Is there nothing to suggest here? Used Bluehost for 10 years without fail, but figured I’d try some new juice. It would have been easier to configure a machine on AWS, at least they have functional support team.
same issue, problem just started happening, have been in touch with support, restarts not working and an upgrade didn’t help
Same issue here. WTF.
This is becoming cumbersome. I don’t buy it; Everyone simultaneously cannot be experiencing spikes in traffic and/or increase in ram utilization.
Same problem here, works for a bit after I restart the droplet, came back this morning and it’s down again. Looks like it’s time to migrate elsewhere…
I got he same issue, pretty annoying. Reboot helps, this problem keeps popping up once a week.
Same issue, suddenly 2 out of my 5 droplets have this error.
Same boat here… It’s really frustrating having to sudo reboot my server every time Jetpack notifies me my sites are down (every day and a half or so). Hope we get some leadway on working towards a fix. I’ll be researching in the meantime. Digital Ocean, any thoughts? It would would be great to get a representatives input on the issue. I haven’t experienced issues like this before with other webhosts, so I’m considering switching, but I cannot deny I love the speed of your SSD servers.
Getting exactly the same problems, what a crock of sh*t DO, why don’t you DO (see what i did there?) something about it?
Hey there! We have some solutions for this issue in the Answers below. Definitely check them out, especially the replies by @kamaln7 and @nestchris, as well as my own.
I have the same problem and tried a number of suggestions, including upgrading to a 1GB droplet, adding a swap file etc.. same problem.
I ended up creating an account here , transferred a copy of my site and it cleared up the problem, improved the performance dramatically and provided us with 24/7 support. This is one of those things where you get what you pay for.
Also having the same issue. This happens fairly frequently
Hi @curiousgeorge, check out our community article here or my response in the “Answers” section below.
I’ve had the same problem. Tried for weeks, went through all the suggested solutions without any success. Digital Ocean support weren’t able to help either. I’ve migrated the Wordpress to another provider now, but shortly after the migration, have had the same problem there. So my current hypothesis is that Wordpress has become very memory hungry in more recent versions, and/or there’s specific memory leaks with some common plugins. I’ve just increased memory to 2GB and swap to 2GB to see if the extra headroom fixes it.
I had the exact same thing. Switched Wordpress over to AWS hosting and the site has been stable since.
Same problem here.