MySQL Death

Just a quick note this evening: BeerRiot was down from about 3:30am to 8am this morning. The MySQL server shut down. I restarted it as soon as I found it down.

Interesting: The MySQL server shut down, but the ErlyDB connection to it was still alive and waiting. As soon as the MySQL server came back up, ErlyDB automatically reconnected, and the site was live.

Sounds like as good of a reason as any to consider switching to Mnesia. I have to assume it’s easier to monitor that than to watch/restart MySQL.

Author: Bryan

I'm the creator of Symbology (, BeerRiot (, lots of homebrew, some furniture, and other things. There's more about me at

2 thoughts on “MySQL Death”

  1. Mnesia is cool, but only if your whole database can fit into RAM.

    CouchDb is a pretty cool database for web apps, though it isn’t very mature yet. It’s intentionally not SQL-driven and is a very different model from most RDBMSen. If you’re up to that kind of a change in architecture, it would of course be an added bonus to have the BeerRiot database also be an Erlang/OTP system.

  2. The Erlang MySQL driver by default attempts to automatically reconnect to the server if a connection is lost. This is a good thing because it lets the system heal itself if the database temporarily goes offline. Using Mnesia would remove one moving part — the MySQL database — and hence would lower the chance of failure. However, MySQL is better than Mnesia for disk storage, which is pretty much the only option if you’re running your app on a RAM-constrained VPS.

    CouchDB looks cool but I’m not sure it solves a real-world problem. MySQL is definitely good enough for most apps, and ErlyDB hides from you the messy details in working with MySQL directly.

Leave a Reply to Yariv Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s