Database problem fixed - I hope!
Mar 9th, 2010 by Mike
For the last few months I’ve been struggling to work out why Blat keeps displaying a “Error establishing a database connection” message. It’s been a real nightmare to try and track down, because the error message would only be displayed intermittently, and it would only happen every two or three days. Sometimes the Blat server would run for months without displaying the message, and sometimes it would only run for a few hours.
I’ve been pulling my hair out trying to work out what was going on. At one stage I thought it might be the Yandex crawler overloading the server as it tried to index all the blogs on the site. I blocked the Yandex bot using robots.txt, but the database problem persisted.
Anyway, today I noticed huge MySQL binary log files. I’ve never bothered to look at the binary log files because I was convinced that I’d turned MySQL binary logging off. But if binary logging was off, why was the latest log date/time stamped with today’s date? So I dug into my.cnf to see what was going on. Hmmmmm… Two bin-log lines in my.cnf! One was commented out, but the other wasn’t. Which means that binary logging has actually been enabled, even when I thought it was disabled. So I have purged all of the MySQL binary log files and I have made 100% sure that binary logging is disabled.
In a nutshell, I hope the database problem now goes away now… For good!
Over the last few hours I’ve been monitoring memory usage on the Blat server, and it’s been hovering around 43% which is pretty low. I’d expect to see it at around 60% to 65%, but the lower, the better
I’ll continue to monitor the situation over the next few days. Let’s all hold thumbs that the database problem is now a thing of the past!

