A live model of a HikariCP JDBC connection pool. Threads borrow a connection, run a query, and return it. The pool grows on demand up to maxPoolSize β and when every connection is busy, new requests wait in a queue until one frees up or they hit the connection timeout and fail.
Try this: hit burst Γ15 with maxPoolSize 10. The pool grows to 10, all go active, and the extra 5 threads drop into the waiting queue β watch their countdown. As queries finish (600ms), waiters are handed the freed connection FIFO, and everyone gets served. Now push query ms up to ~2000 and drop connTimeout to ~900, then burst: the connections are held longer than a waiter is willing to wait, so the queue drains into SQLTransientConnectionException β "Connection is not available, request timed out". That's the #1 HikariCP production error, and the fix is almost never "make the pool bigger" β it's the slow queries holding connections too long.