Contingency Design - More Ideas for mySQL Failures

Published in Web Development on Tuesday, June 8th, 2004

Tips for better error handling and contingency design when your mySQL server goes down.

Life's sense of humour

A mere 24 hours after my original post on contingency design and your mySQL server, life served up a case of lemon flavored twisted irony.

I was going to apply the ideas to a clients site when I had a spare moment, but I was too late when the client suddenly calls and asks "what's with the error message on our site? mySQL server can't connect?".

Great, I'm looking really good here (which of course is more important then how they look to potential clients).

A different message

Luckily my own advice was fresh in my head, but this time rather than leveraging google to help out, we did three things:

  1. We provided a phone number where the company could be contacted along with it's business hours.
  2. We provided a 'Bookmark this page' link (internet explorer only), encouraging the user to check back later.
  3. As it was the mySQL db that was down, we set up a quick and dirty version of a 'Let us call you back' form, where the user could enter their phone number and a time of day to be contacted (the client has this feature on their site already).


In the end the client was happy, and we were asked to go ahead and plug any such holes that may exist in the site. No problem, after all, anything can be done, for a price!

Comments and Feedback

Some good ideas, Mike

This topic seems to be everybody\'s new darling (at least regarding all the new entries in my Feed Reader ;)) which isn\'t a bad thing, is it?

Thanks Minz, I really like the whole idea. Trouble is, one can get carried away with all of the possibilities.

For example, we have a real-estate site that updates it\'s db every evening. The property listings are spidered and in Google, and so there is potential for surfers to click thru from Google to a listing that no longer exists. What to do?

For now, we simply apologize and refer them to the search tool, however we could do somthing where we run the referring keywords though the site\'s keyword search. This would give the user alternate options right away. A good idea, but will the client see it as worthwhile, and pay for it?

Home » Blog » Web Development

Check out the blog categories for older content

The latest from my personal website,

SiteUptime Web Site Monitoring Service

Sitepoint's web devlopment books have helped me out on many occasions both for finding a quick solution to a problem but also to level out my knowlegde in weaker areas (JavaScript, I'm looking at you!). I am recommending the following titles from my bookshelf:

The Principles Of Successful Freelancing

I started freelancing by diving in head first and getting on with it. Many years and a lot of experience later I was still able to take away some gems from this book, and there are plenty I wish I had thought of beforehand. If you are new to freelancing and have a lot of questions (or maybe don't know what questions to ask!) do yourself a favor and at least check out the sample chapters.

The Art & Science Of JavaScript

The author line-up for this book says it all. 7 excellent developers show you how to get your JavaScript coding up to speed with 7 chapters of great theory, code and examples. Metaprogramming with JavaScript (chapter 5 from Dan Webb) really helped me iron out some things I was missing about JavaScript. That said each chapter really helped me to develop my JavaScript skills beyond simple Ajax calls and html insertion with libs like JQuery.

The PHP Anthology: 101 Essential Tips, Tricks & Hacks

Like the other books listed here, this provides a great reference for the PHP developer looking to have the right answers from the right people at their fingertips. I tend to pull this off the shelf when I need to delve into new territory and usually find a workable solution to keep development moving. This only needs to happen once and you recoup the price of the book in time saved from having to develop the solution or find the right pattern for getting the job done..