MariaDB 11.4 Slow Query Lock-up — All Connections Blocked on Rocky Linux 9
A long-running query in MariaDB 11.4 is holding locks and blocking all other queries. Database connection pool exhausted.
Pattern
DATABASE_EVENT
Severity
HIGH
Confidence
68%
Remediation
Auto-Heal
Test Results
Metric
Expected
Actual
Result
Pattern Recognition
DATABASE_EVENT
DATABASE_EVENT
Severity Assessment
HIGH
HIGH
Incident Correlation
N/A
None
Cascade Escalation
N/A
No
Remediation
—
Auto-Heal — Corax resolves autonomously
Scenario Conditions
Rocky Linux 9. MariaDB 11.4 long query running for 330 minutes. Lock held on critical table. All other queries waiting. Connection pool at max.
Injected Error Messages (1)
MariaDB 11.4 slow query blocking on Rocky Linux 9 — query running 330 minutes, database connection pool exhausted at max connections, all other queries blocked, mariadbd lock contention
Neural Engine Root Cause Analysis
Database infrastructure event detected — the connection pool may be exhausted preventing new connections, replication lag is growing between primary and replica, deadlocks are occurring between competing transactions, or slow queries are degrading overall database performance. Database issues cascade to affect all applications and services that depend on the database.
Remediation Plan
1. For connection pool exhaustion, check current connections with 'SHOW PROCESSLIST' or 'pg_stat_activity' and identify idle/stuck connections.
2. For replication lag, check replica I/O and SQL thread status and identify long-running transactions on the primary.
3. For deadlocks, review the deadlock graph (InnoDB: 'SHOW ENGINE INNODB STATUS', Postgres: check pg_locks) and optimize transaction ordering.
4. For slow queries, enable and review the slow query log, add missing indexes, and optimize query plans with EXPLAIN.
5. Consider scaling read replicas or implementing connection pooling (PgBouncer/ProxySQL) if connection limits are consistently hit.