I recently inherited a niche blog from someone with a mutual interest in the subject matter who was no longer interested in maintaining it.
I have a VPS to host a half dozen small (almost no traffic) websites and for development purposes, and I moved the blog to the VPS. Shortly after moving it to my VPS, I began getting out-of-the-blue out of memory errors and processes crashing left and right. All my sites on that VPS would be up and very responsive and the next second BOOM processes being killed left and right and the websites down and/or incredibly slow.
Long story short(er), I finally traced the problems down to this blog that I had recently moved. Looking through raw logs and error logs, I could see traffic hitting the site as normal, and then all of a sudden a single IP hitting the server hundreds of times in a row (corresponding to the same time the memory errors were triggering).
This was/is happening multiple times/day from different IPs… everything working fine, and then all of a sudden, some random IP just nailing my server hundreds of times over a 20-120 seconds and crippling it.
My initial approach was to start blocking these IPs via htaccess as they came up. The problem with this is that I’m not up to over a hundred IPs added to the list and still adding 4-7/day.
I can’t find any rhyme/reason for the problem, and my host simply wants me to upgrade the memory of my VPS. I’m reluctant to do this though, because the website really doesn’t get an excessive amount of traffic that a VPS shouldn’t be able to handle.
Here is an excerpt from my raw logs from a few weeks ago showing accesses to the website:
173.206.29.247 - - [31/Aug/2010:07:07:50 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:49 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:49 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:51 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:50 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:51 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:51 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:51 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:51 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:51 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:51 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:51 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:52 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:52 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:52 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:52 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:52 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:52 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:52 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:52 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:52 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:53 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:53 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:53 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:54 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:53 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:54 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:54 -0500]
24.199.219.129 - - [31/Aug/2010:07:07:53 -0500]
There are then literally hundreds of accesses from that IP over the next minute with it finally ending at [31/Aug/2010:07:09:00 -0500]… then 10 minutes later, a completely different IP that does the same exact same thing. Then a few hours will go by, and then it will happen again… all in all probably 8-12 times/day.
Other things I’ve thought of:
- Perhaps the IP I have assigned the website to was a “bad” IP from a previous owner
- Perhaps the problem is with wordpress or a plugin (though I’ve run several WP blogs, and never had a problem). I have disabled all the plugins except All-in-one SEO.
Sorry for the lengthy post, but I thought it better to give more detail than less. At my wits end with this problem here, as my VPS is still crashing at least 2-3 times/day and I can’t figure out how to remedy the problem.
Any ideas?