Table Lock Contention on MyISAM Tables
warningMyISAM table locks blocking concurrent queries, causing query queuing and latency spikes. MyISAM uses table-level locking, so writes block all other operations on the table. Mixed read/write workloads suffer severe contention.
mysql.performance.table_locks_waited / (mysql.performance.table_locks_immediate + mysql.performance.table_locks_waited) > 0.1, with mysql.performance.table_locks_waited.rate increasing
Identify MyISAM tables causing contention by querying information_schema.tables WHERE engine='MyISAM'. Convert MyISAM tables to InnoDB for row-level locking: ALTER TABLE table_name ENGINE=InnoDB. Before conversion, test with a copy of the table and review any MyISAM-specific features in use (e.g., full-text search, which InnoDB now supports). Monitor mysql.myisam.key_buffer_bytes_used - high values indicate active MyISAM usage. For read-heavy MyISAM tables, consider LOW_PRIORITY writes or READ LOCAL locks as temporary mitigation.