Sometimes tables in the mySQL database crash after a server restart or after a lost connection to the database. This have happen several times for the last 3-4 weeks. This is how the error message looks like:
145 - Table './xxx/sessions' is marked as crashed and should be repaired select value from sessions where sesskey = '60fa1fab3a3d285cfb7bc1c93bb85f64' and expiry > '1395226673' [TEP STOP]
So far it’s have been the tables "sessions" and "whos_online" that have crashed. If I repair the tables in phpmyadmin it will work fine again
After the last crash I changed "sessions" from MyISAM to InnoDB. The table "whos_online" still use MyISAM.
I use osCommerce 2.2 rc2a and I'm looking for any thoughts and suggestions in this matter.
One solution might be to change both these tables to InnoDB, since it supposed to be self-healing. Is that a good or bad idea?
Another one would be to have them in MyISAM and do something like this with the php-file that echo the error message:
if $error contain "is marked as crashed and should be repaired"
run a table repair script
Would that be a good or bad idea?
Here’s my server specs Database: MySQL 5.5.36-cll PHP Version: 5.3.15