I'm having that typical problem of Website encountered unexpected error popping up sometimes and then after repairing watchdog MySQL table it all works find again.

My question is if there is a module that would do this automatically? Or any script that I could run from cron or from drupal?

I installed db maintenance module and thought it does that, but apparently no.

Thank you!


Does MySQL crash after that error? Either way your watchdog table is being corrupted. Are you running out of disk space? Make sure you are using InnoDB tables; MyISAM is prone to corruption.

You can check your table type by running this from a MySQL command prompt and looking for the Engine= parameter.

mysql> show create table watchdog;

You can also disable dblog and enable syslog instead. Syslog writes to your system logs and is much more scalable for higher traffic sites. See if that solves your problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.