Subject | Re: Help locate a connection leak... |
---|---|
Author | skullmaggots |
Post date | 2004-05-05T17:09:39Z |
Hi Roman,
I am using 1.0.1. The FBWrappingDataSource reports...
getConnectionCount()=31
getIdleTimeout()=60000
getIdleTimeoutMinutes()=1
getMinSize()=0
getMaxSize()=150
getBlockingTimeout()=5000
The connectionCount property matches exactly that as reported by
netstat. However the number of connections in the pool continues to
grow until it reaches the maxSize(takes about 3 days or so) and then
subsequent connections fail with 'No Managed Connections Available'
exception.
Are there any circumstances under which a connection that has been
returned to the pool is not reusable?
regards,
Jeff.
--- In Firebird-Java@yahoogroups.com, "Roman Rokytskyy"
<rrokytskyy@a...> wrote:
I am using 1.0.1. The FBWrappingDataSource reports...
getConnectionCount()=31
getIdleTimeout()=60000
getIdleTimeoutMinutes()=1
getMinSize()=0
getMaxSize()=150
getBlockingTimeout()=5000
The connectionCount property matches exactly that as reported by
netstat. However the number of connections in the pool continues to
grow until it reaches the maxSize(takes about 3 days or so) and then
subsequent connections fail with 'No Managed Connections Available'
exception.
Are there any circumstances under which a connection that has been
returned to the pool is not reusable?
regards,
Jeff.
--- In Firebird-Java@yahoogroups.com, "Roman Rokytskyy"
<rrokytskyy@a...> wrote:
> Hi,new
>
> > I have an application that just recently after a deployment of a
> > version started to open more connections to the database serverthan
> > before, so we suspected a connection leak where a connectioncause a
> > obtained from the pool (via FBWrappingDataSource) was not being
> > returned or could not be reused for some reason.
>
> What version of the JayBird do you use? 1.0.1 or 1.5 RC2?
>
> > But I need to understand the type of error that would really
> > leak so I have the following questions, note:- I'm using anot
> > FBWrapping datasource(max=100,min=0,idle=1,pooled=true).
> >
> > 1) If Statements, PrepareStatements, or CallableStatements were
> > closed but the connection they were obtained using were would thisMost
> > cause an issue?
>
> At least this would not lead to a new connection being allocated.
> likely at some point you would run out of handles.Closing
>
> > 2) Is the order of closing resources important.
> > For example I have found code that closed Statements, before
> > the ResultSets obtained via the Statements, would this cause anymean
> > issues?
>
> In 1.5 closing ResultSet after Statement would cause SQLException.
>
> > 3) Again if a ResultSet wasn't closed but the connection was, is
> > this a problem?
>
> No, when you close the statement, result set is closed.
>
> > Also if I stop access to the site and then wait says 10 mins (ldle
> > time=1 min, min connections=0) I would expect under normal
> > circumstances for all the database connections to close, is this
> > right?
>
> Depends on the version. In 1.0.1 it could happen that not all idle
> connections were closed.
>
> > What I have observed is that for 130 connections open, only 18 are
> > closed after waiting 10 mins with no site activity, does this
> > 112 (130-18) connections have leaked?the
>
> Not necessarily. They might happily live in pool. Ask the pool for
> current number of connections. If it reports 0, then 112 haveleaked.
>
> Roman