You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Malcolm Edgar <ma...@gmail.com> on 2010/04/06 15:23:03 UTC
Connection Leak Detection
Hi All,
We have a scenario where a connection pool is "leaking" connections,
i.e. they are being held by the application and not being closed.
Overtime the connection pool is slowly becoming exhausted which will
lead to application errors.
Looking at this from the database side SQL Server we can see the
connections and the last query executed, which was a pool query to
check whether the connection is valid. So it appears that the
connection is obtained from the pool (DataSource), but never used or
closed.
The application server is JBoss 4.0.3 using JRockit JVM 1.5.
Do anyone have any good approaches for diagnosing the cause of the
potential "leak".
regards Malcolm Edgar
Re: Connection Leak Detection
Posted by Marco Gattei <ma...@gmail.com>.
Once i had some problems with jboss 4.0.3
Look at
http://www.jboss.org/file-access/default/members/jbossweb/freezone/docs/latest/jndi-datasource-examples-howto.html#Common%20Problems
"Preventing dB connection pool leaks"
and
http://commons.apache.org/dbcp/configuration.html
But turn out to be problems in application.... i didn't correctli closed
connecction --> prepared statement --> result Set. cousing the leak
Hope this helps
Marco
Malcolm Edgar ha scritto:
> Hi All,
>
> We have a scenario where a connection pool is "leaking" connections,
> i.e. they are being held by the application and not being closed.
> Overtime the connection pool is slowly becoming exhausted which will
> lead to application errors.
>
> Looking at this from the database side SQL Server we can see the
> connections and the last query executed, which was a pool query to
> check whether the connection is valid. So it appears that the
> connection is obtained from the pool (DataSource), but never used or
> closed.
>
> The application server is JBoss 4.0.3 using JRockit JVM 1.5.
>
> Do anyone have any good approaches for diagnosing the cause of the
> potential "leak".
>
> regards Malcolm Edgar
>
>