MyBB Community Forums

Full Version: mybb_datacache table crashed !
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Detailed description of your problem, including steps to reproduce if necessary
I received reports today that users could see all forums. I connected and checked permissions in the back end, which checked out OK. However, all plugins were dead (did not show as activated in plugins settings and were obviously also not working).

We had users confirm that they could see forums they did not have permissions to. Exclamation

The datacache table had crashed ! Huh

I can't reproduce this error as I don't know what caused it, but I would hate for it to happen again.



What are your suggestions? I noticed there is a task to check for crashed tables, which is not set to run, but is there anything I can do to prevent this from even happening?

New installation or upgrade (from which version of MyBB)?

Running 1.6.5 as of 12/3/2011

Screenshot or error text, verbatim

There is no error text, but are there any useful logs I can check?
Try running following command in SQL tab of PHPMyAdmin window:

Quote:REPAIR TABLE mybb_datacache
I am confused about why MyBB can't automatically repair the table...
(2012-01-25, 03:28 PM)GamerVoid Wrote: [ -> ]I am confused about why MyBB can't automatically repair the table...
You could setup a cron job though to check it and repair it at every x time but its not an option IMO, when it crashes, we take the measures, that is how things work. We cannot walk with a safety aid box everywhere by the fear of meeting an accident, do we? Smile

(2012-01-25, 05:28 PM)crazy4cs Wrote: [ -> ]
(2012-01-25, 03:28 PM)GamerVoid Wrote: [ -> ]I am confused about why MyBB can't automatically repair the table...
You could setup a cron job though to check it and repair it at every x time but its not an option IMO, when it crashes, we take the measures, that is how things work. We cannot walk with a safety aid box everywhere by the fear of meeting an accident, do we? Smile
True - but still.

If MyBB is receiving the error, then there should just need to be an if condition, and if that MySQL error fires, then a repair query runs.

I know - MyBB is more complex, but that is the logic.
Exactly, shouldn't there be a check that runs to make sure there are no crashed tables before displaying content? I'm no mysql guru, but it seems like it would be easy enough and use minimal resources.


I do see there is a task in Tools & Maintenance -> Task Manager which can be scheduled to repair tables:

Tables Check
Automatically runs a table check and attempts to repair any crashed tables.




More importantly, what might be the cause, how might I prevent it from happening again, and why the heck would mybb still allow the forums to function in a state where all plugins are disabled and permissions are ignored?


Thanks for the feedback guys!
Quote:More importantly, what might be the cause, how might I prevent it from happening again
You cannot. You can decrease their occurance but cannot prevent it. Table mechanisms are advance and can crash anytime. However you can decrease it like on some of the threads in tutorials forum says changing such sessions, datacache tables type to Innodb from MyISAM can be beneficiary.
I have a problem with this table now, too. I was preparing to do an upgrade from 1608 to 1609, so I did a backup of the DB from within ACP. I got sidetracked for a while, and when I came back to do the upgrade I couldn't even open the site anymore.
Quote:MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
130 - Incorrect file format 'mybb_datacache'
Query:
SELECT title,cache FROM mybb_datacache

I saw the reply in this thread, that said to try to execute the query to repair the table, but that has failed...
Quote:xx_mybbtest.mybb_datacache repair Error Incorrect file format 'mybb_datacache'
xx_mybbtest.mybb_datacache repair error Corrupt

Is there another option for recovering/repairing this table? Can I just empty it and will it rebuild itself, or something like that? Can I take this table from another site, and somehow install it into this database?

This is my TEST site, so at least that is good... But I would rather not have to completely rebuild that site from scratch.

Thanks for any help!