The down of hongkiat.com

Advertisement


First I must apologize for the slowness and downtime you’ve probably experience in hongkiat.com recent days. I have receive various kind of emails regarding these, some complained, some seeking the reason, some knew what happen and offers to help. I’m here to say, I’m flattered and things should be fine by now – for now.

Why the downtime?

Few error messages like “Account Suspended”, “Bandwidth Limit Reach”, etc has been displayed and taken down endless times. Website is totally a chaos. Reason – An article was recently digged by a friend and makes it to digg.com main page. I’m still on a shared-hosting and it could not afford to take the load, causing a minor DDos attack alike to my hosting company.

How bad is the Digg effect?

CPU usage above 60%, Apache and mySQL full occupied and crashes. My web-hosting company has been receiving endless complain from other shared hosting websites, and here I apologize again. I really didn’t see this coming. I mean I was prepared for content to be digged; but I did not expect it to turn out that bad. Previously 2 other contents were continuously digged with hits were higher but things did not went wrong. I over confidently took the trust for granted.

How to solve this?

Simplest and fastest way I took was to convert the digged content into static page. Make sure it will not affect the Apache and mySQL server. A content will connect to Apache and mySQL when its PHP based, therefore I have to quickly

1. Static-fy the Digged content
View source for the particular content

  1. Copy all its Source Codes
  2. Create a static HTML of of it
  3. Create a static link. Say if the URL in Digg.com leads people to www.domain.com/category/page-title/. What you do is you blatantly create “category” and “page-title” folder. Put the static html inside “page-title” and name it index.html.

When Digg users clicks on it, they are then directed to a static HTML, the disadvantage is they cannot post comments or any inter-server action; but the advantage is you help the server to save some resources.

2. Cache most current contents
To play save, cache all your other content, making them “static” for some good time frame. If you are using method (1) above to convert all dynamic pages to static it will be tedious. Use WP-Cache.

  1. Download it, upload to wp-content/plugins/ and Activate it.
  2. (Admin Panel) Options -> WP-Cache -> Enable It
  3. Done

This will attempt to cache (static) content that are loaded.

Thank you

I must really express my gratitude to my hosting company for the patient and co-operation. The site could have down for good if both side have not been communicate and working together. Also thanks to LiewCF for pointing me to very useful resources.

This is not a perfect solution

This is a temporarily solution, you are safe from digg.com attack for now. But the best solution will always be either

  1. Get a dedicated server
  2. Host with servers that can survive a digg attack

I would really like to hear from you if you have experience in handling this. I believe they are more better ways to handle this.

Related Contents

Sponsors

Posted by hongkiat in Web 2.0 , at 03.04.07

Comments

  1. LiewCF March 4th, 2007

    you’re welcome, hongkiat. Among the webmasters, we always say that “you get what you pay”. It is critical to find the balance point… Anyway, congrats on digg effect. ;)

    Reply
  2. Rexted March 4th, 2007

    If you will convert it to static HTML will the adsense or any CPC will still work? What I mean will it still count the PAge imnpression?

    Reply
  3. mypapit March 4th, 2007

    I always read your blog, been wondering about that downtime too. You can use digg defender from Elliot Black (http://elliottback.com/wp/archives/2006/04/21/digg-defender-a-plugin-for-wordpress/), to protect your blog from being digged down.

    Reply
  4. Thilak March 5th, 2007

    I agree with you. Shared hosting isn’t one of the best, but thanks for publishing full feeds, I didn’t feel the down time at all!

    Reply
  5. ShaolinTiger March 5th, 2007

    My best tactic was to do a 302 redirect to a coral cached version of my own page.

    Reply
  6. hongkiat March 5th, 2007

    Thilak:I not a fan of excerpt, so guess my readers aren’t either. :)
    ST:I tried doing 302 redirect manually but soon found tedious. End up using WP-Cache

    Reply
  7. Ashish Mohta May 1st, 2007

    I heard something as dugg mirror. Which can be used at the time of digg.

    Here is the link http://www.michiknows.com/2007/03/26/how-i-integrated-dugg-mirror-when-i-got-dugg/

    Reply

Leave a reply