tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "neal" <nealcab...@yahoo.com>
Subject RE: DBCP Woes!
Date Tue, 29 Oct 2002 00:55:39 GMT
Well, I have max connections set to 100, which is a lot of connections ..
and I'm not even sure I've used that many today.  Come to think of it, I
would be suprised if I've used have that many!

Nonetheless, this is a good resource you pointed me to!  Thanks!  I hadn't
seen this yet.  I'm give it a thorough read tonight and see if I can get
this thing to behave any better, per the suggestions in the doc.

Thanks.
Neal

-----Original Message-----
From: Craig R. McClanahan [mailto:craigmcc@apache.org]
Sent: Monday, October 28, 2002 3:48 PM
To: Tomcat Users List
Subject: Re: DBCP Woes!




On Mon, 28 Oct 2002, neal wrote:

> Date: Mon, 28 Oct 2002 16:25:17 -0800
> From: neal <nealcabage@yahoo.com>
> Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> Subject: DBCP Woes!
>
> DBCP works fine initially but seems the conn pool is exhausted quickly, as
> if the connections aren't being released.  But I made sure last night that
> every Sonnection and Statement object is closed and nullified so I am
> suprised Im still having this error.
>

The only way for the connection pool to be exhausted is for your app to
somehow bypass the connection.close() calls (which Tomcat will never do
for you), or you've got more simultaneous requests for an available
connection than the maximum number of entries in your pool.

> On thing of interested.  Prior to receiving the connection pool exhausted
> error, I recieve this error:
>
> javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
>

There's obviously no way to know what's going on without a detailed
examination of your code (and the rest of the exception stack trace), but
I'd have to guess that you've coded the JNDI lookup parameters wrong in
some scenario.

> Might this mean there is something else, other than simple release of
> Connections happening here?  Any ideas what this might mean?
>

Double check that you're always closing the connection, even when an
exception happens.  The Tomcat docs describe a technique that uses the
"finally" statement to insulate yourself from this sort of problem - see
the code example at the very bottom of:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-example-howt
o.html

> Thanks.
> Neal
>

Craig


--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message