atom feed51 messages in org.apache.tomcat.usersRE: DBCP Woes!
FromSent OnAttachments
Peng AnnieOct 28, 2002 3:57 am 
Shapira, YoavOct 28, 2002 6:02 am 
Robert L SowdersOct 28, 2002 12:58 pm 
Shapira, YoavOct 28, 2002 1:07 pm 
Ricky LeungOct 28, 2002 3:22 pm 
Craig R. McClanahanOct 28, 2002 3:48 pm 
Craig R. McClanahanOct 28, 2002 4:15 pm 
nealOct 28, 2002 4:24 pm 
nealOct 28, 2002 4:55 pm 
Mike JacksonOct 28, 2002 4:55 pm 
nealOct 28, 2002 4:58 pm 
Robert L SowdersOct 28, 2002 5:42 pm 
Robert L SowdersOct 28, 2002 5:50 pm 
Bill BarkerOct 28, 2002 11:13 pm 
Peng AnnieOct 29, 2002 12:27 am 
David TildesleyOct 29, 2002 12:39 am 
Robert L SowdersOct 29, 2002 12:57 am 
Robert L SowdersOct 29, 2002 1:04 am 
Peng AnnieOct 29, 2002 1:08 am 
Robert L SowdersOct 29, 2002 2:01 am 
Mike JacksonOct 29, 2002 3:24 pm 
nealOct 29, 2002 3:39 pm 
Mike JacksonOct 29, 2002 3:43 pm 
Mike JacksonOct 29, 2002 4:02 pm 
micaelOct 29, 2002 4:05 pm 
nealOct 29, 2002 4:21 pm 
nealOct 29, 2002 4:31 pm 
nealOct 29, 2002 4:52 pm 
Iain SandersonOct 29, 2002 4:57 pm 
micaelOct 29, 2002 5:08 pm 
nealOct 29, 2002 5:15 pm 
Brandon CruzOct 29, 2002 5:17 pm 
nealOct 29, 2002 5:35 pm 
V. CekvenichOct 29, 2002 5:37 pm 
nealOct 29, 2002 5:43 pm 
nealOct 29, 2002 6:20 pm 
nealOct 29, 2002 6:47 pm 
Jacob KjomeOct 29, 2002 9:00 pm 
Craig R. McClanahanOct 29, 2002 10:15 pm 
nealOct 30, 2002 1:34 am 
Reynir HübnerOct 30, 2002 2:17 am 
Luc SanteramoOct 30, 2002 2:21 am 
nealOct 30, 2002 2:21 am 
nealOct 30, 2002 3:14 am 
omar...@telebahiacelular.com.brOct 30, 2002 3:50 am 
Tim FunkOct 30, 2002 3:54 am 
nealOct 30, 2002 4:40 am 
Mike JacksonOct 30, 2002 8:55 am 
Mike JacksonOct 30, 2002 8:58 am 
Craig R. McClanahanOct 30, 2002 9:50 am 
nealOct 30, 2002 1:10 pm 
Subject:RE: DBCP Woes!
From:neal (neal@yahoo.com)
Date:Oct 28, 2002 4:55:17 pm
List:org.apache.tomcat.users

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.

-----Original Message----- From: Craig R. McClanahan [mailto:crai@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 <neal@yahoo.com> Reply-To: Tomcat Users List <tomc@jakarta.apache.org> To: Tomcat Users List <tomc@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

Craig