You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Wes Clark (JIRA)" <ji...@apache.org> on 2007/11/29 05:55:43 UTC

[jira] Created: (DBCP-250) maxIdle limit exceeded and number does not decrease

maxIdle limit exceeded and number does not decrease
---------------------------------------------------

                 Key: DBCP-250
                 URL: https://issues.apache.org/jira/browse/DBCP-250
             Project: Commons Dbcp
          Issue Type: Bug
    Affects Versions: 1.2.2
            Reporter: Wes Clark


Today, during load testing we noticed that the number of idle database connections exceeded the default value. The default values for maxIdle and maxActive are being used. After running the application with 200 users, the number of idle connection went to 18 and stayed there. 

Is this a bug?  Does testOnIdle need to be set to true for the idle connections to be decreased?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DBCP-250) maxIdle limit exceeded and number does not decrease

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

Phil Steitz commented on DBCP-250:
----------------------------------

Are you using BasicDataSource?  Pls provide configuration information and database and info on how you are observing the idle connection count.  If you are measuring idle connections from the database, it is possible that the number of idle connections from the database perspective will exceed the number of idle connections in the pool.  The number of idle connections that that pool limits via maxIdle is the number of database connections that are waiting for clients to check them out of the pool.  When a client application calls getConnection and retrieves a connection from the pool, the pool does not count this as an idle connection while the client has it checked out, even if the client is not using it and it is idle from the database engine perspective.  MaxActive, however, should not be exceeded, so you should not be seeing 18 connections open from the pool with the default maxActive setting.

testOnIdle does not have to be turned on for excess idle connections to be removed when they are closed by clients.

> maxIdle limit exceeded and number does not decrease
> ---------------------------------------------------
>
>                 Key: DBCP-250
>                 URL: https://issues.apache.org/jira/browse/DBCP-250
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 1.2.2
>            Reporter: Wes Clark
>
> Today, during load testing we noticed that the number of idle database connections exceeded the default value. The default values for maxIdle and maxActive are being used. After running the application with 200 users, the number of idle connection went to 18 and stayed there. 
> Is this a bug?  Does testOnIdle need to be set to true for the idle connections to be decreased?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DBCP-250) maxIdle limit exceeded and number does not decrease

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

Wes Clark resolved DBCP-250.
----------------------------

    Resolution: Later

Since I can't follow up on this issue immediately, I will resolve it, and re-open it later if I get better information.

> maxIdle limit exceeded and number does not decrease
> ---------------------------------------------------
>
>                 Key: DBCP-250
>                 URL: https://issues.apache.org/jira/browse/DBCP-250
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 1.2.2
>            Reporter: Wes Clark
>
> Today, during load testing we noticed that the number of idle database connections exceeded the default value. The default values for maxIdle and maxActive are being used. After running the application with 200 users, the number of idle connection went to 18 and stayed there. 
> Is this a bug?  Does testOnIdle need to be set to true for the idle connections to be decreased?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DBCP-250) maxIdle limit exceeded and number does not decrease

Posted by "Wes Clark (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DBCP-250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547951 ] 

Wes Clark commented on DBCP-250:
--------------------------------

I hope to be investigating this behavior in more detail at a later date.    We also plan to make testOnIdle the default behavior, which seems to fix the problem.

> maxIdle limit exceeded and number does not decrease
> ---------------------------------------------------
>
>                 Key: DBCP-250
>                 URL: https://issues.apache.org/jira/browse/DBCP-250
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 1.2.2
>            Reporter: Wes Clark
>
> Today, during load testing we noticed that the number of idle database connections exceeded the default value. The default values for maxIdle and maxActive are being used. After running the application with 200 users, the number of idle connection went to 18 and stayed there. 
> Is this a bug?  Does testOnIdle need to be set to true for the idle connections to be decreased?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DBCP-250) maxIdle limit exceeded and number does not decrease

Posted by "Wes Clark (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DBCP-250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547384 ] 

Wes Clark commented on DBCP-250:
--------------------------------

The behavior you describe is the behavior I expected.  We are getting connections from the JDBC driver and adding them to the pool.  We are not using the BasicDataSource (although I wish we did).  We configure the application the JDBC connection string, and pass it to the vendor's driver.  

Does the proper behavior of the connection pool depend upon the use of a BasicDataSource?

> maxIdle limit exceeded and number does not decrease
> ---------------------------------------------------
>
>                 Key: DBCP-250
>                 URL: https://issues.apache.org/jira/browse/DBCP-250
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 1.2.2
>            Reporter: Wes Clark
>
> Today, during load testing we noticed that the number of idle database connections exceeded the default value. The default values for maxIdle and maxActive are being used. After running the application with 200 users, the number of idle connection went to 18 and stayed there. 
> Is this a bug?  Does testOnIdle need to be set to true for the idle connections to be decreased?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DBCP-250) maxIdle limit exceeded and number does not decrease

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

Phil Steitz commented on DBCP-250:
----------------------------------

You do not need to use BasicDataSource.   If you have overriden PoolalbleConnectionFactory.makeObject and you are not returning / using PoolableConnections, then it is possible that you are not properly closing connections. If you think you have discovered a bug in one of the DBCP classes, we can investigate it here if you provide code and ideally a failing test case.  If what you are looking for is help on how to use the classes, it would be better to close this issue and ask questions on the commons user list.  (http://commons.apache.org/dbcp/mail-lists.html) 

> maxIdle limit exceeded and number does not decrease
> ---------------------------------------------------
>
>                 Key: DBCP-250
>                 URL: https://issues.apache.org/jira/browse/DBCP-250
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 1.2.2
>            Reporter: Wes Clark
>
> Today, during load testing we noticed that the number of idle database connections exceeded the default value. The default values for maxIdle and maxActive are being used. After running the application with 200 users, the number of idle connection went to 18 and stayed there. 
> Is this a bug?  Does testOnIdle need to be set to true for the idle connections to be decreased?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DBCP-250) maxIdle limit exceeded and number does not decrease

Posted by "Wes Clark (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DBCP-250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547385 ] 

Wes Clark commented on DBCP-250:
--------------------------------

We override the org.apache.commons.dbcp.PoolableConnectionFactory.   Perhaps our adaptation of DBCP has left out some crucial processing?

> maxIdle limit exceeded and number does not decrease
> ---------------------------------------------------
>
>                 Key: DBCP-250
>                 URL: https://issues.apache.org/jira/browse/DBCP-250
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 1.2.2
>            Reporter: Wes Clark
>
> Today, during load testing we noticed that the number of idle database connections exceeded the default value. The default values for maxIdle and maxActive are being used. After running the application with 200 users, the number of idle connection went to 18 and stayed there. 
> Is this a bug?  Does testOnIdle need to be set to true for the idle connections to be decreased?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.