Posted By: cody
Last Updated: Tuesday March 30, 2010
A few months ago we created a custom suspension page for shared accounts that are suspended. Now normally this is pretty straightforward task and you wouldn’t put much thought into it - we didn’t either. So we went ahead and setup a sub-domain, modified our layout accordingly setup cPanel. That’s it!
Well they say hindsight is 20/20 and we would tend to agree. Suddenly we got a huge surge of traffic from suspended accounts which was to be expected but due to a single oversight we had to skurry before the server decided to go kaput: PHP! We use PHP (Zend Framework, etc) for our website and portal so naturally we carried over some code from our website to our suspension page without thinking about the amount of traffic that would be hitting it. The result was a large amount of PHP processes bogging down the CPU causing our suspension page to almost become suspended itself. Obviously to fix it we simply put up a static page and called it a day.
Moral of the story: Even the most trivial of things can cause issues to a server; this is even more true when you’re running robust scripts such as WordPress in a shared environment. Think about caching and scaling in general - not only will you learn you’ll prevent silly mistakes. One common issue we see constantly in our environment is people setup their 404’s to a non-static / heavily dynamic page and as a result if they get any sort of flux of traffic / spiders to the 404 pages their MySQL and CPU usage goes insane.