I have a database with about 65 tables. One of the tables is a large MyISAM table called order_line. Now and then this table is corrupt. When I use the CHECK TABLE command I get the messages:
Op | Msg_type | Msg_Text
check | warning | "Table is marked as crashed"
check | warning | "3 clients are using or havent's closed the table properly"
check | error | "Found 1149921 keys of 114948"
check | error | "Corrupt"
The reason why MyISAM tables get corrupted is inherent to the implementation of this engine. It relies on the operating system to flush database buffers back to disk instead of using a Write-Ahead-Log and a dedicated strategy to flush dirty buffers. MyISAM is also not transactional.
I strongly suggest using the
InnoDB engine which seems much more suitable for your case (table
order_line). MyISAM is just not the right engine for your use case.