My recent talk about what might happen if gamers ran the world made Digg yesterday, and went a bit big. Big to the point that I got a nice email from my host pointing out that my PHP processes were killing the entire shared host that I’m hosted on, and that I needed to rectify this immediately.
The fires were mainly calmed by installing WP-Super-Cache, which did pretty much what it says on the tin. That said, I did learn a few things from the incident. In no particular order:
- WordPress’ PHP processes for rendering a page are really, really intensive. Most of the time, that’s not a problem, but when you’re being bombarded with hits, it’ll take it’s told. Flat HTML might be the way forward.
- Super-Cache isn’t exactly difficult to install, but it requires permissions in lots of places. The best advice I can give is to walk through the installation instructions carefully, and when it doesn’t work, go over the troubleshooting guide in
readme.txtone step at a time. The few issues I had were resolved by walking through the troubleshooting process.
- Most importantly, a combination of the two parts above: you should assume that at some point, you’re going to need this kind of caching, and you’re going to need it fast. Installing and configuring WordPress plugins on a server being bombarded with hits really isn’t much fun. Instead, install the caching plugin of your choice when you set your server up, and make sure it’s working at that time. Then, when the horde descends upon your lowly shared host, you can head straight there and click “enable caching”, rather than having to fight fires for an hour when you really should be working, or in the pub. This also means you can configure the thing to not cache your feed, which is a useful thing to be able to do; I’m about to head off and do that now.
Everything appears to have cooled off now, and I’m not getting any more emails from Joyent about my usage. To Joyent’s credit, they were helpful at explaining the problem and tolerant of the time it took for me to fix things, which was appreciated. And next time I get an absurd amount of traffic, with any luck, I’ll be ready for it.