πŸ—„οΈ HikariCP Pool

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.

β˜… Star on GitHub

connection pool

waiting threads (connection-request queue)

β€” no threads waiting β€”

pool stats

active 0
idle 0
total / max 0 / 10
waiting 0
served 0
timeouts 0
avg wait 0 ms
peak active 0

event log

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.