MyBB Community Forums

Full Version: SQL Table Error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all,

Recently (the last few days), my forum has started to have issues with the mySQL database. Another admin has twice come onto the forum to find some sort of table crash (I haven't seen it so I can't tell you exactly what it is). This is fixed by repairing the tables.

The most recent one is as follows:

The error in the task log is as follows:
Hourly Cleanup  	Today, 06:00 AM  	MyBB SQL Error - [20] array ( 'error_no' => 145, 'error' => 'Table \'./gbatmwne_myb/mybb_threads\' is marked as crashed and should be repaired', 'query' => ' DELETE FROM mybb_threads WHERE deletetime != \'0\' AND deletetime < \'1262844041\' ', )

This then repeated itself at 7am, and 8am.

The other admin then came along and ran tables check:

Tables Check  	Today, 08:47 AM  	Notice: The check tables task successfully ran and repaired the gbatmwne_myb.mybb_threads table(s).

The hourly cleanup ran fine after that.

The first one, however, affected mybb_posts rather than mybb_threads. It wasn't caught by the hourly cleanup, so either happened between 6am and 6:44 am (when it was fixed by a table repair), or wasn't detected by the cleanup.

Tables Check  	01-05-2010, 06:44 AM  	Notice: The check tables task successfully ran and repaired the gbatmwne_myb.mybb_posts, gbatmwne_myb.mybb_posts, gbatmwne_myb.mybb_posts table(s).

Obviously something is causing this, and given that me and my other administrator aren't online all the time, it can often cause 2 or 3 hours of downtime before being fixed.

One simple "fix" would be to schedule the tables check task to run regularily. I don't know what server load this would cause. However, this isn't a fix, but a patch. Can anyone give any insight into why this might be happening?

Edit: I should add:

I was running 1.4.9 when this happened. I have since upgraded to 1.4.11. I have no idea if that's relevent - we were running 1.4.9 for months before this happened, so I doubt it is.
Could be so many things, I'd first contact my host and complain that my MySQL tables are crashing frequently. Usually this is a problem with the MySQL server, not with your software.
Thanks for the swift reply.

I'll fire them an email. Perhaps the mySQL logs can tell me more.