On 19 February 2010 13:53, James Bensley jwbensley@gmail.com wrote:
Hey List,
We have a CentOS VPS with a hosting provider hosting one of our company websites. We are finding recently that about once a week a table will "crash" and needs repairing via phpMyAdmin. This is a recent development as this never used to be a problem. I wondered if any has any insight as to why this might be happening?
I'm assuming it's a MyISAM table - they are very easy to "crash"; if anything is left "open" on them when the DB is closed, then they are marked as crashed - for example if your VPS goes through an unclean shutdown, loses connectivity to the (virtual) drives, etc.
Probably the easiest way to get around it is to convert the table to InnoDB, If you can't do that for whatever reason (it will almost certainly have performance implications), then enable the auto-repair option for MyISAM tables in MySQL - either at the command line when you start MySQL or in your my.cnf file - see http://dev.mysql.com/doc/refman/5.1/en/server-options.html#option_mysqld_myi... for details.
HTH,
Greg