You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by dinakaran ganesan <gd...@hotmail.com> on 2016/02/03 22:00:56 UTC

question regarding attributes

Hi
          We have the following set of parameters setup for  tomcat in our environment.

maxActive=100
maxWait=60000
maxIdle=15
minIdle=30
initialSize=15
testOnBorrow=false
validationQuery=SELECT 1 FROM DUAL
validationInterval=60000
minEvictableIdleTimeMillis=3000000 ( 3000 secs)
timeBetweenEvictionRunsMillis=300000 (300 secs)


Reading thru the following section, we understood minEvictableIdleTimeMillis  as number of milliseconds a connection has to be idle before it gets removed from connection pool and timeBetweenEvictionRunsMillis as number of milliseconds to elapse before running connection validation again. But what we are noticing is that despite setting timeBetweenEvictionRunsMillis  to

300000 (3000 secs or 5 minutes), the test kicks in every 10 minutes and runs Idle connection validation. We are trying to understand what is triggering the Idle connection validation every 10 minutes.

https://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html#Common_Attributes

[https://tomcat.apache.org/tomcat-7.0-doc/images/asf-logo.gif]<https://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html#Common_Attributes>

Apache Tomcat 7 (7.0.67) - The Tomcat JDBC Connection Pool<https://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html#Common_Attributes>
tomcat.apache.org
Introduction: The JDBC Connection Pool org.apache.tomcat.jdbc.pool is a replacement or an alternative to the Apache Commons DBCP connection pool. So why do we need a ...



Cheers
Dina

RE: question regarding attributes

Posted by dinakaran ganesan <gd...@hotmail.com>.
Hi Chris
         First of all a big thanks for taking time to respond.
  You are right about my typo regarding 3000 seconds.

We are using default DBCP2. I know that the idle connection check runs every 10 minutes because i am monitoring a column called last_call_et in v$session table in oracle db which lets us know how long a connection was idle. The moment that connection gets used this column value gets reset to 0 and then again oracle starts to increment it with every elapsing second that connection remains idle.

Cheers
Dina



Sent from my Samsung Galaxy smartphone.


-------- Original message --------
From: Christopher Schultz <ch...@christopherschultz.net>
Date: 2/5/2016 8:37 PM (GMT-08:00)
To: Tomcat Users List <us...@tomcat.apache.org>
Subject: Re: question regarding attributes

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dina,

On 2/3/16 4:00 PM, dinakaran ganesan wrote:
> We have the following set of parameters setup for  tomcat in our
> environment.
>
> maxActive=100 maxWait=60000 maxIdle=15 minIdle=30 initialSize=15
> testOnBorrow=false validationQuery=SELECT 1 FROM DUAL
> validationInterval=60000 minEvictableIdleTimeMillis=3000000 ( 3000
> secs) timeBetweenEvictionRunsMillis=300000 (300 secs)

Presumably, this is for a JNDI DataSource? What type? The default type
(DBCP2)?

> Reading thru the following section, we understood
> minEvictableIdleTimeMillis as number of milliseconds a connection
> has to be idle before it gets removed from connection pool and
> timeBetweenEvictionRunsMillis as number of milliseconds to elapse
> before running connection validation again. But what we are
> noticing is that despite setting timeBetweenEvictionRunsMillis to
>
> 300000 (3000 secs or 5 minutes)

3000 seconds is slightly longer than 5 minutes. Fortunately, your typo
is in your text and not in your configuration (but you probably didn't
copy/paste your configuration... It might be better if you did).
300000 is in fact 5 minutes.

> the test kicks in every 10 minutes and runs Idle connection
> validation. We are trying to understand what is triggering the
> Idle connection validation every 10 minutes.

I don't see any settings above that would end up being 10 minutes. How
do you know the idle test is running every 10 minutes?

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAla1eIQACgkQ9CaO5/Lv0PDxGQCghE5ck5JcN1p/sBQ/waOMw66I
WnsAn13mrwJ6kqvuJcZ6IeKIkD03nfYe
=/G+Q
-----END PGP SIGNATURE-----

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


Re: question regarding attributes

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dina,

On 2/3/16 4:00 PM, dinakaran ganesan wrote:
> We have the following set of parameters setup for  tomcat in our
> environment.
> 
> maxActive=100 maxWait=60000 maxIdle=15 minIdle=30 initialSize=15 
> testOnBorrow=false validationQuery=SELECT 1 FROM DUAL 
> validationInterval=60000 minEvictableIdleTimeMillis=3000000 ( 3000
> secs) timeBetweenEvictionRunsMillis=300000 (300 secs)

Presumably, this is for a JNDI DataSource? What type? The default type
(DBCP2)?

> Reading thru the following section, we understood 
> minEvictableIdleTimeMillis as number of milliseconds a connection
> has to be idle before it gets removed from connection pool and 
> timeBetweenEvictionRunsMillis as number of milliseconds to elapse
> before running connection validation again. But what we are
> noticing is that despite setting timeBetweenEvictionRunsMillis to
> 
> 300000 (3000 secs or 5 minutes)

3000 seconds is slightly longer than 5 minutes. Fortunately, your typo
is in your text and not in your configuration (but you probably didn't
copy/paste your configuration... It might be better if you did).
300000 is in fact 5 minutes.

> the test kicks in every 10 minutes and runs Idle connection 
> validation. We are trying to understand what is triggering the
> Idle connection validation every 10 minutes.

I don't see any settings above that would end up being 10 minutes. How
do you know the idle test is running every 10 minutes?

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAla1eIQACgkQ9CaO5/Lv0PDxGQCghE5ck5JcN1p/sBQ/waOMw66I
WnsAn13mrwJ6kqvuJcZ6IeKIkD03nfYe
=/G+Q
-----END PGP SIGNATURE-----

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