Distinguishing connection pool exhaustion from thread pool queuing in MariaDB
0 reputation · 08 Feb 2023, 15:23 UTC
Designing monitoring for intermittent connection limits in MariaDB requires separating true connection exhaustion from queuing behavior introduced by the thread pool plugin.
The documented limits involve max_connections as a hard ceiling, wait_timeout governing idle session lifetime, and the thread_pool_size controlling how many worker threads service incoming requests. Sleep state connections can hold pool slots without active I/O, and a mismatch between server wait_timeout and application pool maxLifetime is a known source of stale connections.
Thread pool starvation can mimic exhaustion symptoms when thread_pool_size is low, making it unclear whether a limit is reached at the connection layer or the request handling layer. Synchronized visibility of application pool metrics and server process states is needed for reliable diagnosis.
Which server status indicators reliably differentiate a max_connections limit from thread pool queuing under load? Does thread_pool_size interact with max_connections in a way that changes the observed error behavior? Can wait_timeout and application pool lifetime be compared without assuming a specific client library implementation?