Your customer's website is dynamic, probably running a heavy script which is why your server can't handle the traffic. You simply need to make it static (not all of the website, just the page which is being hit at the moment).
So here's how you can do this:
- Save your customer's dynamic page (which is under heavy load at the moment) as a static .html file
- Edit your apache config or customer's .htaccess file. You'll need to turn that dynamic page into static one:
instead of opening http://CustomersWebsite.com/index.php?page=AwesomeArticle
it should open http://CustomersWebsite.com/AwesomeArticle_static.html
So when somebody visits this page, static file will be served instead of dynamic even though you see .php in the URL - no php and no MySQL will be touched.
We'll use mod_rewrite for that. Here's what you need to put to .htaccess file:RewriteEngine on
RewriteCond %{QUERY_STRING} ^page=AwesomeArticle(.*)$
RewriteRule ^index.php$ AwesomeArticle_static.html - Save it and watch your server going back to life. All your customer's website is dynamic except this page.
Once the traffic gets back to normal, you can remove rewrite rules.
There are other ways to solve this problem - making a mirror, offloading to other server, etc.. It doesn't matter how you choose to solve this problem as long as you don't suspend website in the most important time of it's life.
Note: this is a repost to my previous article "Digg effect took down your website. How to come back online with only a few lines of code.".