Archive - Originally posted on "The Horse's Mouth" - 2006-03-15 07:28:36 - Graham Ellis
It's worrying when a web site that's been rock solid starts giving intermittent problems - and even more worrying when those intermittent problems just fade away and you're left unsure as to what was the cause of them. I'm afraid I'm the sort who wonders if and when the issue will return.
And so it was yesterday, when we were failing to connect to our databases from our web site - quite a serious situation as we use the databases throughout the site for "back lists", for tailoring pages to suit each individual's stated country and languages, and to help prevent denial of service attacks. And the failure was ugly, too.
As an short term measure, I've put in a couple of re-tries on the connection, and I've caught and flagged the mysql warnings by adding an extra @ in front of the MySQL connection and query calls in the PHP. Failures are now flagged with a neat warning in the page head, so that any of us who sees that message will be able to note / act on it, and customers get a professional message and not a page that, frankly, looked broken.
But this morning, it's a crisp and bright start and running fine.