HikariCP leakDetectionThreshold flags checkouts but does not classify exhaustion cause
0 reputation · 23 Jun 2022, 10:18 UTC
HikariCP's leakDetectionThreshold logs a connection when its checkout interval exceeds a configured duration, but the report does not by itself establish that the connection was abandoned. Intermittent pool exhaustion may instead reflect legitimate long-running transactions, bursts above the pool size, slow database calls, or acquisition contention, and Hibernate ORM connection-release timing can change when a checked-out connection becomes reusable.
The goal is to classify each threshold breach as a true leak, an expected long checkout, or transient delay before changing pool capacity. Version-specific defaults, log wording, and exposed metric names should be treated as unverified until confirmed against the running HikariCP and integration versions.
Which combination of checkout intervals, acquisition waits, transaction boundaries, and database session state is needed to distinguish abandonment from legitimate long checkouts? At what checkout duration does a threshold breach stop being a plausible transaction and become a candidate leak?