Skip to content

Alerting checklist ​

Candidate signals for MySQL 8.4 InnoDB, not a complete incident detector. Set thresholds from workload baselines and service objectives. The linked schedules demonstrate selected mechanisms, not alert accuracy or production recovery time. Views require privileges and instrumentation; metrics require available, enabled counters and comparable sample intervals.

#SignalQuery sourceEvidence and limit
1Oldest transaction agemin(trx_started) in information_schema.innodb_trxDetector: transaction age, not read-view age
2Idle connections with an InnoDB transactioninnodb_trx joined to processlist command = 'Sleep'Detector: one tagged idle reader
3Current InnoDB row-lock waitsrows in sys.innodb_lock_waitsBlocker diagnosis: one waiter; metadata waits need other views
4Detected deadlock ratecomparable Δ lock_deadlocks samplesCounter: one asserted delta
5InnoDB row-lock timeout ratecomparable Δ lock_timeouts samplesTimeout: error asserted, metric delta not asserted
6Sustained history-list growthtrx_rseg_history_lenHistory health: lower bound, not bytes or culprit proof

Use the signals to select an investigation. An old idle transaction plus a growing history list is consistent with read-view retention, but does not identify the only cause. Check other readers, write load, and purge capacity before expecting cleanup. Short transaction ages do not prove hot-row contention; inspect the actual wait edges. Deadlock reports can guide lock ordering and range-lock investigation. Retries must respect the application boundary.

Timeouts without detected deadlocks do not prove an acyclic wait graph: innodb_deadlock_detect can be disabled. The manual states: "At times, it may be more efficient to disable deadlock detection". In that configuration, lock wait timeouts resolve deadlocks. Check configuration and waits, not just counter correlations.

These metrics do not validate application invariants. The lost-update and write-skew schedules can commit without errors; use writer coordination and application-level invariant checks.

Further reading ​

MIT Licensed · Every transcript on this site was generated by a real database run against MySQL 8.4.11 and PostgreSQL 18.6 at 8fa27b8; shared YAML has an independent psycopg/PyMySQL check.