You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by அருள்ராஜன் அ லை <al...@gmail.com> on 2024/01/11 16:08:56 UTC

Tomcat dbcp2 connection pool configuration

Hi

We are using Tomcat 9.0.84 and Tomcat DBCP2 connection pool and the DB is
Oracle 19c. We are seeing the closed connections and the standment objects
are not cleared even after the connection says closed. Anybody faced
similar issue ?

Here is the values in tomcat context.xml

maxWaitMillis="60000"
maxIdle="10"
logAbandoned="true"
removeAbandonedOnBorrow="true"
removeAbandonedOnMaintenance="true"
removeAbandonedTimeout="60"
removeAbandoned="true"
testonBorrow="true"
testWhileIdle="true"
timeBetweenEvictionRunsMillis="120000"
driverClassName="oracle.jdbc.OracleDriver"
accessToUnderlyingConnectionAllowed="true"
maxTotal="200"
type="javax.sql.DataSource"

-- 
நன்றி,
அருள்.

Re: Tomcat dbcp2 connection pool configuration

Posted by Phil Steitz <ph...@gmail.com>.
On Tue, Jan 16, 2024 at 9:07 AM Christopher Schultz <
chris@christopherschultz.net> wrote:

> Hello,
>
> On 1/11/24 11:08, அருள்ராஜன் அ லை wrote:
> > Hi
> >
> > We are using Tomcat 9.0.84 and Tomcat DBCP2 connection pool and the DB is
> > Oracle 19c. We are seeing the closed connections and the standment
> objects
> > are not cleared even after the connection says closed. Anybody faced
> > similar issue ?
> >
> > Here is the values in tomcat context.xml
> >
> > maxWaitMillis="60000"
> > maxIdle="10"
> > logAbandoned="true"
> > removeAbandonedOnBorrow="true"
> > removeAbandonedOnMaintenance="true"
> > removeAbandonedTimeout="60"
> > removeAbandoned="true"
> > testonBorrow="true"
> > testWhileIdle="true"
> > timeBetweenEvictionRunsMillis="120000"
> > driverClassName="oracle.jdbc.OracleDriver"
> > accessToUnderlyingConnectionAllowed="true"
> > maxTotal="200"
> > type="javax.sql.DataSource"
> >
>
> How are you observing the "closed connections" and the "not-closed
> statements"?
>
> Are you using the latest Oracle driver that is available for your platform?
>

One more question:  Why do you have accessToUnderlyingConnectionAllowed set
to true?  Is the application code possibly using this to access physical
connections directly (and maybe closing them)?
You can grep the code for getInnermostDelegate() to check for this.

Phil

>
> -chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat dbcp2 connection pool configuration

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Hello,

On 1/11/24 11:08, அருள்ராஜன் அ லை wrote:
> Hi
> 
> We are using Tomcat 9.0.84 and Tomcat DBCP2 connection pool and the DB is
> Oracle 19c. We are seeing the closed connections and the standment objects
> are not cleared even after the connection says closed. Anybody faced
> similar issue ?
> 
> Here is the values in tomcat context.xml
> 
> maxWaitMillis="60000"
> maxIdle="10"
> logAbandoned="true"
> removeAbandonedOnBorrow="true"
> removeAbandonedOnMaintenance="true"
> removeAbandonedTimeout="60"
> removeAbandoned="true"
> testonBorrow="true"
> testWhileIdle="true"
> timeBetweenEvictionRunsMillis="120000"
> driverClassName="oracle.jdbc.OracleDriver"
> accessToUnderlyingConnectionAllowed="true"
> maxTotal="200"
> type="javax.sql.DataSource"
> 

How are you observing the "closed connections" and the "not-closed 
statements"?

Are you using the latest Oracle driver that is available for your platform?

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org