Uploaded image for project: 'Commons DBCP'
  1. Commons DBCP
  2. DBCP-379

number of connections created has crossed more than maxActive

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • 1.5.1, 2.0
    • None

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bhaskar Bhaskar NA
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: