You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Bhaskar NA (JIRA)" <ji...@apache.org> on 2007/10/16 14:07:50 UTC

[jira] Created: (POOL-107) number of connections created has crossed more than maxActive

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.3


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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (POOL-107) number of connections created has crossed more than maxActive

Posted by "Manoj (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/POOL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12832355#action_12832355 ] 

Manoj commented on POOL-107:
----------------------------

Yes I have installed 1.5.4 and we are still able to reproduce the issue.  The configuration for the connection pool is following.
GenericObjectPool connectionPool = new GenericObjectPool();
connectionPool.setMaxActive(25);
connectionPool.setMidIdle(3);
connectioinPool.setMinEvictableIdleTimeMillis(120*60*1000);
connectionPool.setTimeBetweenEvictionRunsMillis(1*60*1000);
connectionPool.setTestOnReturn(false);
connectionPool.setTestOnBorrow(true);

This is reproducible as said above only high load that is lot of parallel threads running. 

> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (POOL-107) number of connections created has crossed more than maxActive

Posted by "Bhaskar NA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/POOL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540137 ] 

Bhaskar NA commented on POOL-107:
---------------------------------

How is the DBCP datasource being instantiated? Is DBCP running in a web container? 

In tomcat's server.xml, in ResourceParams, factory param is configured to use org.apache.commons.dbcp.BasicDataSourceFactory.
In the code, we do the jndi lookup for the above ds and call ds.getConnection().

What is the database? Is it remote from the host running the pool?
oracle is the database and it is in a remote machine

Are all of the TCP connections ESTABLISHED?
yes

Are you sure they are all associated with the client connection pool? 
yes. 


Are client threads timing out waiting for connections during the test (i.e.., do you see org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object)? 

Yes, if i have too many concurrent threads then i use to hit this issue.

What does the DBCP client do with connections obtained during the test? 
query/update's 
and then giveback connection to pool

Is the load constant, with threads just repeating the same requests with no delays in between requests? 
load was constant.
they use to repeat same work

What is the duration of the test? 
30 min.


> 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.3
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (POOL-107) number of connections created has crossed more than maxActive

Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/POOL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831974#action_12831974 ] 

Phil Steitz commented on POOL-107:
----------------------------------

Manoj,

The latest version is 1.5.4.  Can you try upgrading to the latest version?  If your problem persists, please post your full pool configuration.  

> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (POOL-107) number of connections created has crossed more than maxActive

Posted by "Mark Thomas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/POOL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742346#action_12742346 ] 

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

No problem. Good to hear 1.5.2 is working for you.

> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (POOL-107) number of connections created has crossed more than maxActive

Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/POOL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phil Steitz updated POOL-107:
-----------------------------

    Fix Version/s:     (was: 1.3)
                   1.4

> 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.4
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (POOL-107) number of connections created has crossed more than maxActive

Posted by "Mark Thomas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/POOL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742310#action_12742310 ] 

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

Please provide some sample code that demonstrates the issue.

> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (POOL-107) number of connections created has crossed more than maxActive

Posted by "Mark Thomas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/POOL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695929#action_12695929 ] 

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

I can re-create this, but only by forcing a particular execution sequence with a debugger. The issue lies within the for loop in ensureMinIdle(). Consider the case where _numIdle=0, _minIdle>0 and _numActive+1 == _maxActive. If a client thread enters borrowObject() at the point where the evictor thread is about to call addObject() both threads will create objects leaving _numIdle==1 & _numActive==_maxActive. The next client call to borrowObject() will result in _numActive==_maxActive+1

DBCP-44 contains a patch that addresses this for GenericObjectPool. The other pools need a similar patch. Since it is pool that needs to be patched, I'll use this issue to track progress rather than DBCP-44.

> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (POOL-107) number of connections created has crossed more than maxActive

Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/POOL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phil Steitz updated POOL-107:
-----------------------------

    Fix Version/s:     (was: 1.4)
                   2.0

I can't reproduce or verify this as a pool or dbcp bug.   The only way I can understand this happening is if connections or associated sockets are failing to close.  I have not been able to reproduce this behavior with Oracle, MySql or postgres, using same or similar settings to above.  
Leaving open but changing fix version to 2.0.  

> 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: 2.0
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (POOL-107) number of connections created has crossed more than maxActive

Posted by "Krystian Szczesny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/POOL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742342#action_12742342 ] 

Krystian Szczesny commented on POOL-107:
----------------------------------------

I'm sorry Mark,

I came back here to remove my comment as after building the app from scratch I have found that by default it used 
WhenExhaustedAction = GROW and not BLOCK!

Sorry  about that, tiredness.
It works fine now!

> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (POOL-107) number of connections created has crossed more than maxActive

Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/POOL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540086 ] 

Phil Steitz commented on POOL-107:
----------------------------------

The pool code to ensure minIdle should not cause this to happen.  
Can you provide some more information on your setup and load test?  In particular,
How is the DBCP datasource being instantiated?  Is DBCP running in a web container?
What is the database? Is it remote from the host running the pool?  Are all of the TCP connections ESTABLISHED?  Are you sure they are all associated with the client connection pool?  
Are client threads timing out waiting for connections during the test (i.e.., do you see org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object)?
What does the DBCP client do with connections obtained during the test?
Is the load constant, with threads just repeating the same requests with no delays in between requests?
What is the duration of the test?


> 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.3
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (POOL-107) number of connections created has crossed more than maxActive

Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/POOL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phil Steitz updated POOL-107:
-----------------------------

    Fix Version/s:     (was: 2.0)
                   1.5

> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (POOL-107) number of connections created has crossed more than maxActive

Posted by "Bhaskar NA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/POOL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535234 ] 

Bhaskar NA commented on POOL-107:
---------------------------------

When I changed minIdle to 0 and maxActive to 30 and maxIdle to 30 then number of connections went upto 29. 

In all the above tests, i had 40 concurrent threads that intern caused application code to get a connection from pool.


> 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.3
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (POOL-107) number of connections created has crossed more than maxActive

Posted by "Mark Thomas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/POOL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Thomas resolved POOL-107.
------------------------------

    Resolution: Fixed

This has been fixed for both GOP and GKOP based on the patch attached DBCP-44.

> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (POOL-107) number of connections created has crossed more than maxActive

Posted by "Manoj (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/POOL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831528#action_12831528 ] 

Manoj commented on POOL-107:
----------------------------

The problem of exceeding maximum number of  connection still happens for us even after upgrading to 1.5.2.

The issue is that it keep max active to the value set while creating the GenericObjectPool but in the backend it keep creating and closing the connections so it doesn't get Exhausted. We have not WhenExhaustedAction since it default to BLOCK. This is only reproducible in the hight load scenario.



> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (POOL-107) number of connections created has crossed more than maxActive

Posted by "Krystian Szczesny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/POOL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742303#action_12742303 ] 

Krystian Szczesny commented on POOL-107:
----------------------------------------

Hi
We were using commons-pool 1.4 in our application and we came across this issue.
Unfortunately it is critical for us :/

When I have a setting of:
max active: 10
max:idle 5
min idle:2

When running test with 20 threads I get:
before test is ran:
num active: 0
num idle: 2

during test:
num active: 20
num idle: 0

after the test is done:
num active: 0
num idle: 5

I've updated commons-pool to 1.5.2 and unfortunately same thing happens, I cannot control maximum of active connections!
I've tried changing the min idle and max idle to many different settings but was never able to limit the number of active connections!


> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (POOL-107) number of connections created has crossed more than maxActive

Posted by "Bhaskar NA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/POOL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535436 ] 

Bhaskar NA commented on POOL-107:
---------------------------------

Today i tried again with common DBCP 1.2.2 but found the same issue.
I had 
maxIdle=30
minIdle=30
maxActive=30

after doing the loadtest, i found in netstat that there were 120 connections established. 

I don't see an issue of crossing the maxActive if i set minIdle to 0.


> 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.3
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.