[ 
https://issues.apache.org/jira/browse/POOL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206526#comment-13206526
 ] 

Mark Thomas commented on POOL-107:
----------------------------------

I've spent some time looking at this and I am struggling to see how the 
described behavior could occur. The configuration provided looks like a JNDI 
resource definition from a container environment. You do not say which 
container or which version. Neither do you say which version of DBCP you are 
using. Further, there is no configuration that suggests that it isn't the 
container that is providing the connection pool. Neither is a stack trace 
provided of the initial errors that occur which would be very enlightening.

Making a whole rash of assumptions (Tomcat is the container, the container 
provides the pool, latest Tomcat version) then if MySQL is not running, the 
connection pool will not be created when an attempt is made to obtain a 
connection. This will continue until the database is started at which point a 
connection pool will be created. In this scenario, the previous failures will 
have no effect on the pool that is created.

Without sufficient detail to reproduce this issue, the assumption is going to 
be that the problem is somewhere (container code, application code) rather then 
POOL or DBCP.
                
> number of connections created has crossed more than maxActive 
> --------------------------------------------------------------
>
>                 Key: POOL-107
>                 URL: https://issues.apache.org/jira/browse/POOL-107
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: OS:Red Hat Enterprise Linux AS release 4 (Nahant Update 
> 2)
> uname:Linux 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:32:14 EDT 2005 i686
> vm_info: Java HotSpot(TM) Server VM (1.4.2_13-b06) for
> linux-x86, built
> on Oct 18 2006 09:55:11 by unknown with unknown compiler
>            Reporter: Bhaskar NA
>             Fix For: 1.5
>
>
> I found that when the minIdle is configured then during loads, common pool 
> creates more number of connections  it will be greater than maxActive.
> When I had following settings:
> maxActive = 50
> maxIdle = 30
> minIdle=30
> factory=org.apache.commons.dbcp.BasicDataSourceFactory
> maxWait=10000
> timeBetweenEvictionRunsMillis=900000
> numTestsPerEvictionRun=50
> minEvictableIdleTimeMillis=1800000
> testWhileIdle=true
> testOnBorrow = true
> validationQuery='select 1 from dual'
> Number of connections in the pool went upto 121. (found thru netstat)
> When I changed minIdle to 15 and did my load test connecitons in the pool 
> went upto 66
> Looks like maxActive is getting bypassed with minIdle.
> When I changed minIdle to 10 and maxActive to 30 and maxIdle to 30 then 
> number of connections went upto 40.
> Can someone please throw light on what is going on here? I am using DBCP 
> 1.2.1 and common pool 1.3.
> Bhaskar

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to