Hi All, all of a sudden I'm getting the following messages on my site (www.memo.tv):
user warning: Table './msaktenc_memotv/cache_page' is marked as crashed and should be repaired query: LOCK TABLES cache_page WRITE in /home/msaktenc/public_html/includes/database.mysql.inc on line 174.

I didn't touch the code or database, one day it was working, one day it wasn't. I immediately contacted my host to see if they had changed anything, awaiting an answer.

I get the error on the tables cache_page, node_counter, and access_log. Originally I was getting hundreds of errors on every page, I disabled the statistics module and now only get one or two (the node_counter and access_log errors don't appear anymore).

I disabled the access_log module and uninstalled it, thinking the tables would be removed, and when I re-enable it I was hoping the tables would be constructed properly - but I still get the node_counter and access_log errors - so I've disabled them again. But of course this is a temp hack solution, does anyone know what the problem might be? or how I can fix it?

Comments

VM’s picture

The cache tables you can empty. The contents will be regenerated,

The other tables you can try to repair by using the repair in phpmyadmin or similar.

make a backup first asa best practice.

ekapus’s picture

I'm seeing this same thing happening. I know we can clean the tables, but these errors keep coming back.

Is this a MySQL issue? Is it a Drupal issue? Does anyone have any idea to the causes of this?

Our hosting company is blaming us, but I feel like it's probably a connection problem.

urwen’s picture

hi,

you can solve this simply going to your database in phpmyadmin, selecting from structure the table and, at the end ot the lists tables, select "repair table" on the drop-down menu

in mysql you´ll be executing this command:

REPAIR TABLE `watchdog`

(change "watchdog" with the affected database).

doriangray’s picture

Thanks! your reply helped me solve this problem immediately.
BTW, what might cause this ? i didnt touch anything in my website files and database.

micheleannj’s picture

Suddenly in the middle of last night the sessions and accesslog tables crashed. They both repaired fine, but I'm concerned about the cause -- any ideas what did it and how to prevent it from happening again?

thanks

Firmitas, utilitas, venustas!

lindsay’s picture

Thank you, this also really helped me.

ianth’s picture

Ur message solved my problem in "admin crash in -user- table. Thanks you brother. keep post good think ;) god bless u

jojo4122’s picture

I had the same problem, i restored the crashed table from my backup. Hence, it would be great to know the cause of the problem to prevent it happen again in future.

Thanks in advance.

VM’s picture

you can't "prevent" it. a table can crash for a few reasons. connection dieing midstream for example.

jimbox’s picture

i never knew you could do it from the mysql cmd shell- but you can also do it from a traditional shell (bash) prompt too.

myisamchk -r -q table_name.MYI (w/out "-q" if this quick fix doenst work)

this approach is good if mysqld wont even start for some reason. this permits having the db file fixed offline. as such you'd also have to use the "--update-state" switch so mysql gets properly marked that the table is fixed. if you run it while mysqld is running this happens automatically.

resource: http://search.mysql.com/search?q=repair.html&lr=lang_en

ianth’s picture

Ur message solved my problem in "admin crash in -user- table. Thanks you brother. keep post good think ;) god bless u

sashi.kiran’s picture

ur message really helped me alot..I was planning to put backup and many more ways to solve the problem. Thank you very much for ur SIMPLY THE BEST idea...

kirdydy’s picture

Your solution works !!! Thanks a lot..!

urwen’s picture

sometimes happens, it is not possible to prevent it... as far as i know. Best solution, make frecuently backups :-)

toci’s picture

I have the same error. This happened in the same moment when my hard disk failed. I received this error in my system log file "unrecovered read error - auto reallocate failed".
If the hard disk have bad clusters and the system try to move the data to a new place you can get some file corrupted. Thats what happened to my sql table.
Somebody Asked why it's happening. This may be the answer. For me it is so.