You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kausik Dey <k_...@hotmail.com> on 2003/12/16 02:29:54 UTC
Tomcat 5.0.16 DBCP Connection Pool Exhausted Error
Hi Guys,
Currently I am using 5.0.5 in production. I was trying to upgrade to 5.0.15 or 5.0.16. I made necessary changes to server.xml to create informix DBCP. Unfortunately, I am getting "Connection Pool Exhausted" error while trying to obtain the connection from Datasource. Is it a bug in these version or I am doing something wrong? Please advise me.
Re: Tomcat 5.0.16 DBCP Connection Pool Exhausted Error
Posted by Kwok Peng Tuck <pe...@makmal.net>.
Hmm maybe you are not returning connections after using them ?
In the tomcat docs they do give a pattern you could use in your code, like
try {
}catch(SQLException e) {
}finally {
try {
//Perform your close statements here.
}catch(SQLException e) {
}
}
HIH .
Kausik Dey wrote:
>Hi Guys,
>Currently I am using 5.0.5 in production. I was trying to upgrade to 5.0.15 or 5.0.16. I made necessary changes to server.xml to create informix DBCP. Unfortunately, I am getting "Connection Pool Exhausted" error while trying to obtain the connection from Datasource. Is it a bug in these version or I am doing something wrong? Please advise me.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Tomcat 5.0.16 DBCP Connection Pool Exhausted Error
Posted by Kausik Dey <k_...@hotmail.com>.
Hi,
I am getting right away. Below the code structure where I am getting.
try{
Context ctx = new InitialContext();
if(ctx == null )
throw new Exception("No Context found");
DataSource ds =
(DataSource)ctx.lookup("java:comp/env/jdbc/informixDB");
if (ds != null) {
Connection conn = ds.getConnection();
------------------ Here its going to catch section with "connection pool
exhausted error". --------------------------
-
-
Thanks
KD
----- Original Message -----
From: "Kwok Peng Tuck" <pe...@makmal.net>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Monday, December 15, 2003 8:44 PM
Subject: Re: Tomcat 5.0.16 DBCP Connection Pool Exhausted Error
> Isn't removeAbandoned deprecated ? If so is it still usable ?
>
>
> >
> > Hmm... are you getting the error right away or only after a few
requests?
> >
> > Hard to say anything without further information. It is always a good
> > idea to make sure you properly close all Statements, ResultSets anc
> > Connections obtained from the pool.
> > If you ae using commons dbcp, you could also add
> >
> > <parameter><name>logAbandoned</name><value>true</value></parameter>
> > <parameter><name>removeAbandoned</name><value>true</value></parameter>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Tomcat 5.0.16 DBCP Connection Pool Exhausted Error
Posted by Kwok Peng Tuck <pe...@makmal.net>.
This is where I saw it :
http://jakarta.apache.org/commons/dbcp/apidocs/org/apache/commons/dbcp/AbandonedConfig.html
But I think the code is still in there, just marked as deprecated :D
Philipp Taprogge wrote:
> Hi!
>
> Kwok Peng Tuck wrote:
>
>> Isn't removeAbandoned deprecated ? If so is it still usable ?
>
>
> I can't find a word about it being deprecated on
> http://jakarta.apache.org/commons/dbcp/configuration.html
>
> I am using this parameter quite successfully.
>
> Phil
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Tomcat 5.0.16 DBCP Connection Pool Exhausted Error
Posted by Philipp Taprogge <Ph...@gmx.net>.
Hi!
Kwok Peng Tuck wrote:
> Isn't removeAbandoned deprecated ? If so is it still usable ?
I can't find a word about it being deprecated on
http://jakarta.apache.org/commons/dbcp/configuration.html
I am using this parameter quite successfully.
Phil
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Tomcat 5.0.16 DBCP Connection Pool Exhausted Error
Posted by Kwok Peng Tuck <pe...@makmal.net>.
Isn't removeAbandoned deprecated ? If so is it still usable ?
>
> Hmm... are you getting the error right away or only after a few requests?
>
> Hard to say anything without further information. It is always a good
> idea to make sure you properly close all Statements, ResultSets anc
> Connections obtained from the pool.
> If you ae using commons dbcp, you could also add
>
> <parameter><name>logAbandoned</name><value>true</value></parameter>
> <parameter><name>removeAbandoned</name><value>true</value></parameter>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Tomcat 5.0.16 DBCP Connection Pool Exhausted Error
Posted by Philipp Taprogge <Ph...@gmx.net>.
Kausik Dey wrote:
> Hi Guys,
> Currently I am using 5.0.5 in production. I was trying to upgrade to 5.0.15 or 5.0.16. I made necessary changes to server.xml
> to create informix DBCP. Unfortunately, I am getting "Connection
Pool Exhausted" error while trying to obtain the connection
> from Datasource. Is it a bug in these version or I am doing something wrong? Please advise me.
Hmm... are you getting the error right away or only after a few requests?
Hard to say anything without further information. It is always a good
idea to make sure you properly close all Statements, ResultSets anc
Connections obtained from the pool.
If you ae using commons dbcp, you could also add
<parameter><name>logAbandoned</name><value>true</value></parameter>
<parameter><name>removeAbandoned</name><value>true</value></parameter>
to your ressource definition. The first should remove any stale
connections after they time out, the second should give you a stack
trace of the violating code.
Hope this helps
Phil
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org