I had a pretty rough night last month.
After relaxing for a bit with my wife, I checked my site only to find that it wasn’t there at all. Instead, I was greeted with an error message saying that WordPress could not connect to the database.
I logged into my server’s control panel and noticed that the server load was unfathomably high, much more than it could ever take. I’d been dealing with a weird CPU issue for a while so I restarted the server, expecting it to correct itself.
But when my server eventually restarted, the site came back but only for a second, it quickly went down again. Whatever was causing it wasn’t just a temporary issue.
I contacted my host, which told me that they were seeing very high levels of traffic to the server, more than it could handle. It turns out the article I had written about a recent plagiarism case on Reddit was getting some attention both via Reddit itself and Google searches. The volume just seemed too high.
But then I looked at the sample level of traffic that I managed to snag when the site came back up briefly. It was high, many times my normal level, but nothing the server shouldn’t be able to take easily. It had, in the past, handled spiked much bigger than this.
My host agreed and we worked together to keep the site offline but give me access. Once in, I realized that I had made a terrible mistake.
The week before, I had to, in an emergency, create a new theme for my site. As part of that I had disabled W3 Total Cache. While a great move at the time, when I was done I had forgotten to reenable it and the site was without any kind of caching.
I reenabled the plugin, checked that it was working and then opened the site back up to the rest of the world. Sure enough, though the load was high and the server was straining some, it was nowhere near buckling. The highly-elevated traffic remained for several days and, through it all, there wasn’t as much as a glitch or a hiccup.
If I had remembered to reenable W3 Total Cache, or any caching plugin, I probably wouldn’t have noticed the traffic spike until I checked the stats the next day and I certainly wouldn’t have people on Reddit commenting about how quickly my site went down.
It was an embarrassment that ended up being minor, but it serves as a reminder to every WordPress user: Make sure you are using a caching plugin. Read More