tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aman Verma <>
Subject tomcat-dbcp Poolable connection is closed while connection is in ALLOCATED state
Date Sat, 15 Sep 2018 20:07:00 GMT
In the java application (using tomcat 7, JDK 7u51,
tomcat-dbcp-8.0.3.jar, ojdbc6.jar) there is a certain connection leak.
After the connection pool was exhausted (pool reached maxTotal active
connections), I took heap dump. On analyzing heap dump, as expected
maxTotal PoolableConnection and associated maxTotal DefaulPooledObject
was found. All the connection were associated with "ALLOCATED"
PooledObjectState as I would expect.

However, All the PoolableConnection (that seemed to leak) had
"_closed"  boolean as true.

When I decompiled tomcat-dbcp jar, It seems that every time a
PoolableConnection is closed, the code sets associated
PooledObjectState to IDLE and returns the connection to pool.

My doubt is, why did my heap dump capture PoolableConnection as
"closed" while still associated to ALLOCATED PooledObjectState.

image evidence at :


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message