MySQL

InnoDB History List Length Growth

warning
performanceUpdated Mar 2, 2026

InnoDB undo log history list length growing due to long-running transactions or failed purge. Growing history list increases tablespace size, degrades query performance due to version traversal, and can eventually exhaust undo log space.

Technologies:
How to detect:

mysql.innodb.history_list_length > 10000 and increasing, with mysql.innodb.current_transactions showing long-running transactions or mysql.innodb.active_transactions consistently high

Recommended action:

Use SHOW ENGINE INNODB STATUS to view history list length and oldest unpurged transaction age. Query information_schema.innodb_trx for long-running transactions (>1 hour). Identify and terminate zombie transactions: SELECT * FROM information_schema.processlist WHERE time > 3600 AND state != 'Sleep'. Review purge thread performance: innodb_purge_threads should be adequate (default 4), and innodb_max_purge_lag should not be reached. Monitor mysql.innodb.rows_deleted and mysql.innodb.rows_updated - high delete/update rates increase purge workload. Consider innodb_undo_log_truncate (MySQL 8.0+) to reclaim undo space.