Portal Home > Knowledgebase > Articles Database > MyISAM tables keep Crashing


MyISAM tables keep Crashing




Posted by HotDot, 01-28-2016, 03:48 AM
Hi everyone! Hoping somebody here could help. We have a VPS that's using MyISAM as the default storage engine. Most of the sites that are on there are Wordpress sites. The Mysql component keeps restarting because tables are crashing. It appears when they crash, they stay crashed, unless somebody manually repairs them or the MySQL server restarts. Is this something everybody experiences on other hosts when using MyISAM? How do we get reports when our tables have crashed? How do we manage them? How do we get them automatically get repaired? Why are they crashing? Would you advise to switch to InnoDB instead? What are the Pros? What are the Cons? Would really appreciate any help. Thanks!

Posted by ashutoshvct, 01-28-2016, 06:33 AM
Here are some links which will help you: http://dba.stackexchange.com/questio...o-i-prevent-it http://stackoverflow.com/questions/1...ked-as-crashed

Posted by anuja9991, 01-28-2016, 01:34 PM
Have you checked if you have any unwanted plugins installed on wordpress or maybe if you have sufficient resources to host the DB and website?

Posted by Scirious, 01-28-2016, 02:59 PM
I'm not an expert but I would advise you to change to InnoDB for sure. Even if it is a bit havier than MyISAM, it is a lot easier to recover in case of problems and the engine usually do it automatically.

Posted by linux7802, 01-28-2016, 03:22 PM
Before doing any changes check your servers mysql logs and server resources usages and after that take decision to switch to InnoDB because MyISAM is easy to repair but InnoDB required some technical knowledge to recover else you will lose your database tables, so be careful and don't take decision in panic

Posted by HotDot, 01-28-2016, 11:21 PM
Hi everyone! Thanks for all your replies. Here's a snippet of the error log, it's in pastebin. Forum says I can't post links yet so I hid the link. Here it is. pa ste bin. com/ htUrtLkS I've gone through the error log and can't really identify the problem. I do see that the tables repeatedly keep crashing. I don't know if they're crashing because mysql is restarted/crashed or if mysql is restarted/crashed because the tables have crashed. Maybe someone here knows the answer? We are looking at the option of switching over to InnoDB and are just looking at the pros and cons at the moment. So far, what we've known is that InnoDB is a b it more reliable but is harder to recover from a crash/corruption. Is this correct? Edit: Here's what I found in the site's error log: [28-Jan-2016 12:13:43 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query DELETE FROM `wp_options` WHERE `option_name` = 'rewrite_rules' made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), call_user_func_array, RokGallery_Posttypes_RokGallery::flush_rules, WP_Rewrite->flush_rules, delete_option, QM_DB->query [28-Jan-2016 12:13:43 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query DELETE FROM `wp_options` WHERE `option_name` = 'rewrite_rules' made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), call_user_func_array, RokGallery_Posttypes_RokGallery::flush_rules, WP_Rewrite->flush_rules, delete_option, QM_DB->query [28-Jan-2016 12:13:43 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query DELETE FROM `wp_options` WHERE `option_name` = 'rewrite_rules' made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), call_user_func_array, RokGallery_Posttypes_RokGallery::flush_rules, WP_Rewrite->flush_rules, delete_option, QM_DB->querys. Last edited by HotDot; 01-28-2016 at 11:34 PM. Reason: more info

Posted by domainbop, 01-30-2016, 06:31 PM
The most likely reason for the table crashing is an outdated plugin that isn't compatible with the current version. The RokGallery referenced in that dump is only compatible up to WP w3.61 That is correct, but if the corruption if being caused due to an outdated WP plugin then you either need to update it or remove it (since the RokGallery plugins haven't been updated in 3 years you'll probably need to remove them and use a different gallery plugin) Last edited by domainbop; 01-30-2016 at 06:44 PM.

Posted by kevincheri, 01-31-2016, 01:43 AM
Yes. I believe the crash is due to some rogue plugins playing around, and you will need to re-check them and remove if you think they aren't helping on great deal. And yes, innodb might sort the problem, but if you have regular backup of the database in .sql format, I believe you should be fine to proceed. I haven't personally seen much innodb table crashes due to software errors.

Posted by superuser_root, 02-01-2016, 04:06 AM
Hi, This definitely seems as one of the plugin is the real culprit here. One of my suggestion would be change the database/table to innodb which may help you to resolve this issue.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Security updates (Views: 762)
Form Processing in PHP (Views: 711)


Language: