tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffrey Janner <Jeffrey.Jan...@PolyDyne.com>
Subject RE: Tomcat JDBC Pooling - Connections
Date Mon, 08 Apr 2013 15:21:50 GMT
> -----Original Message-----
> From: Madan KN [mailto:madan.kn@gmail.com]
> Sent: Monday, April 08, 2013 9:29 AM
> To: Tomcat Users List
> Subject: Re: Tomcat JDBC Pooling - Connections
> 
> # 99% percent of the time we do have need for 200 active sessions
> across our application cluster. But due to some high spikes we end up
> with 2000 sessions which is ending up in the pool with out getting
> evicted.*
> 
> *
> # I think once the application is out of peak the connections are
> returned in either Round Robin/Random order, which is not making the
> condition for connections inactivity timeout and sweeper is failing to
> evict those connections.
> *
> *
> # How do we set something like LIFO, so that we can control and use
> only required connections during normal operating scenarios & evict
> which are not required.*
> *
> *
> --------------------------------*-------------------
> *Configuration Being Used*
> ---------------------------------------------------
>     <Resource name="jdbc/GlobalHotelsDS" auth="Container"
>                      type="oracle.jdbc.pool.OracleDataSource"
>                      driverClassName="oracle.jdbc.driver.OracleDriver"
>                      factory="oracle.jdbc.pool.OracleDataSourceFactory"
>                      queryTimeout="50"
> 
> _connectionProperties="oracle.jdbc.ReadTimeout=30000,oracle.net.CONNECT
> _TIMEOUT=30000"
> url="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=
> test.dev.com)(PORT=1522))(ADDRESS=(PROTOCOL=TCP)(HOST=test.dev.com)(POR
> T=1522))(LOAD_BALANCE=yes)(CONNECT_DATA=
> (SERVER=DEDICATED)(SERVICE_NAME=test.service.com)))"
>                      user="xxxxxx"
>                      password="xxxxxxx"
>                      connectionCachingEnabled="true"
>                      connectionCacheName="testPool"
> 
> connectionCacheProperties="MaxLimit=20,InitialLimit=10,MaxStatementsLim
> it=80,InactivityTimeout=1800"/>
> 
> 
> *Thanks*,
> Madan KN
> 

The Oracle pool is working as configured.  Once your DB query rate drops below 20 within 30
minutes, it will start closing physical connections.  You could try lowering the InactivityTimeout
setting to have that start sooner.
In you OP you mentioned 200 and 2000 connections, but obviously here you are limiting it to
20 connections, which is a perfectly reasonable size IMHO, in fact maybe a little small for
peak work depending on your app.
Otherwise, as others have stated, please see the Oracle Documentation on the pool that you
are using.
Jeff


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


Mime
View raw message