leaking connections

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

leaking connections

Thomas Beckmann
Hi,

we are using btm 1.3.2 together with an oracle 11 database and activemq 5.2.
After a while the pool does not return any more connections.
Through JMX I can see that the pool has 50 connections (this is the max) in
state ACCESSIBLE but there are onle ~6 transactions listed at any time.

How is it possible that a connection is in state ACCESSIBLE but obviously does
not take part in one of the listed transactions or what is the exact meaning
of state ACCESSIBLE?


Thomas


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: leaking connections

Ludovic Orban
Administrator
The ACCESSIBLE state means the connection has been borrowed from the pool by your code but hasn't been closed.

There are many reasons why you can have more connections in ACCESSIBLE state than transactions, some being:

 - you can have many connections enlisted in the same transaction
 - you commit a transaction before closing the connection
 - you use connections outside of JTA transactions

There are many reasons why a connection could be leaked and the most probable one is your own code. BTM 1.3.2 contains a race condition that can leak connections in some very special case, see http://www.nabble.com/Exception-during-calling-Connection-close()-td20242143.html for more details.

Without more information there very little more I can do to help you.