MySQL – Got error 28 from storage engine

Just after a late night deployment I received this error message while running queries against the production database I just deployed to:

Got error 28 from storage engine query

I could connect to the database fine, but any database query returned that error. To make things worse, that error had also prevented some of the deployment process I just ran from completing successfully, so our game was down until I found a fix. Luckily that didn’t take long. Some quick Googling revealed that the database server was out of disk space:

From http://drupal.org/node/44160

This happened to me this morning =)

The error come when MySQL doesn’t have any free hard disk space to write to. Check your /tmp directory, that’s where I had run into problems. I had forgot to make my backup script delete older backups and it kept writing backups until the disk was full.

That post, and most others I found, suggest to check and clear the server’s /tmp directory, but ours was fine. It had 20 – 30 session files in it and little else – that wasn’t the problem. Instead, our deployment process backs up the database on each publish, and doesn’t clean out old backups. Needless to say, w/multiple publishes happening w/in the same day at times, w/each creating a new database backup, we clearly hit a point where our backups were consuming too much disk space. Once those were deleted, we were back up.

It’s worth noting that whether it be the /tmp directory, or removing other files, the problem is disk space.  Free some up, regardless of how you do it, and you’ll get past this error.

I hope this saves someone some time and panic. Now to see about flushing old backups. 🙂

This entry was posted in Database. Bookmark the permalink.

3 Responses to MySQL – Got error 28 from storage engine

  1. John Dailey says:

    I had exactly the same 28 error – which came up when I added an “order by” in the sql statement. I imagine the “order by” is what required the disk space – oh, by the way the problem was solved by cleaning up the /tmp directory

  2. tquang says:

    If you are using per half RAM like /tmp thought tmpfs, check free memory

  3. Faraz Ahmed says:

    Hi,

    I was also facing same error I have resolved it by following steps:

    http://farazahmed.com/1030-got-error-28-from-storage-engine-993.aspx

Leave a Reply

Your email address will not be published. Required fields are marked *