Bug 56837 - if validationQuery have error with timeBetweenEvictionRunsMillis option, connection pool increase keep going
Summary: if validationQuery have error with timeBetweenEvictionRunsMillis option, conn...
Status: NEW
Alias: None
Product: Tomcat Modules
Classification: Unclassified
Component: jdbc-pool (show other bugs)
Version: unspecified
Hardware: HP Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-11 02:36 UTC by gaplee
Modified: 2014-08-11 02:36 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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?