Bug 56837

Summary: if validationQuery have error with timeBetweenEvictionRunsMillis option, connection pool increase keep going
Product: Tomcat Modules Reporter: gaplee <gap75>
Component: jdbc-poolAssignee: Tomcat Developers Mailing List <dev>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: HP   
OS: Linux   

Description gaplee 2014-08-11 02:36:11 UTC
ENV: 
apache-tomcat-7.0.54
CentOS release 6.5 (Final)
jdk1.7.0_55


in case of  setting the  "timeBetweenEvictionRunsMillis",

when validationQuery is error, connection pool increase keep going.
Even if you set the maximum value(maxActive).

1. setting
    <Resource
         name="jdbc/PPAS_DS"
         type="javax.sql.DataSource"
         minIdle="2"
         initialSize="3"
         maxActive="6"
         timeBetweenEvictionRunsMillis="20000"

         username="xxx"
         validationQuery="select1 12 "
         driverClassName="org.postgresql.Driver"
         password="xxx"
         url="jdbc:postgresql://localhost:5432/postgres"/>

2. try to ues connection Pool
--> validationQuery error 
-------------------------------------------------------
3. server connection increases after 20000 Millis (timeBetweenEvictionRunsMillis value)
netstat -nap | grep 5432 | grep EST | grep java | wc -l
6
 netstat -nap | grep 5432 | grep EST | grep java | wc -l
8
-------------------------------------------------------
If Pool can not guarantee maxActive value, that is problem.

Did I  something wrong use timeBetweenEvictionRunsMillis option?

timeBetweenEvictionRunsMillis option is not available?