Tomcat JDBC pool maxActive limits and abandoned connection detection behavior
0 reputation · 06 Dec 2024, 13:48 UTC
Tomcat JDBC connection pool documents maxActive as the limit for concurrent connections and describes removeAbandoned, abandonedTimeout, minEvictableIdleTimeMillis and logAbandoned as diagnostic controls for pool exhaustion scenarios.
The design question is how these documented limits and controls interact when the goal is to understand intermittent exhaustion without assuming a specific incident or environment.
Uncertainty remains about the ordering and accounting effects of the controls relative to maxActive, and about the observable impact of leak logging when abandonment removal is not enabled.
Does removeAbandoned reclaim a connection against maxActive immediately after abandonedTimeout elapses, or only on the next borrow attempt?
Is logAbandoned=true observable in logs when removeAbandoned is false, and what is the documented relationship between the eviction thread interval minEvictableIdleTimeMillis and abandoned detection?