Subject | Re: Help locate a connection leak... |
---|---|
Author | Roman Rokytskyy |
Post date | 2004-05-04T17:50:14Z |
Hi,
likely at some point you would run out of handles.
connections were closed.
current number of connections. If it reports 0, then 112 have leaked.
Roman
> I have an application that just recently after a deployment of a newWhat version of the JayBird do you use? 1.0.1 or 1.5 RC2?
> version started to open more connections to the database server than
> before, so we suspected a connection leak where a connection
> obtained from the pool (via FBWrappingDataSource) was not being
> returned or could not be reused for some reason.
> But I need to understand the type of error that would really cause aAt least this would not lead to a new connection being allocated. Most
> leak so I have the following questions, note:- I'm using a
> FBWrapping datasource(max=100,min=0,idle=1,pooled=true).
>
> 1) If Statements, PrepareStatements, or CallableStatements were not
> closed but the connection they were obtained using were would this
> cause an issue?
likely at some point you would run out of handles.
> 2) Is the order of closing resources important.In 1.5 closing ResultSet after Statement would cause SQLException.
> For example I have found code that closed Statements, before Closing
> the ResultSets obtained via the Statements, would this cause any
> issues?
> 3) Again if a ResultSet wasn't closed but the connection was, isNo, when you close the statement, result set is closed.
> this a problem?
> Also if I stop access to the site and then wait says 10 mins (ldleDepends on the version. In 1.0.1 it could happen that not all idle
> time=1 min, min connections=0) I would expect under normal
> circumstances for all the database connections to close, is this
> right?
connections were closed.
> What I have observed is that for 130 connections open, only 18 areNot necessarily. They might happily live in pool. Ask the pool for the
> closed after waiting 10 mins with no site activity, does this mean
> 112 (130-18) connections have leaked?
current number of connections. If it reports 0, then 112 have leaked.
Roman