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

Phil Steitz commented on DBCP-572:
----------------------------------

This is not a bug.  By default, the pool does not try to keep connections alive 
while they are idle.  If you want to do that, configure one or both of 
connection validation or testWhileIdle.  This is really a question for the user 
list.

> timed out connections remain active in the pool
> -----------------------------------------------
>
>                 Key: DBCP-572
>                 URL: https://issues.apache.org/jira/browse/DBCP-572
>             Project: Commons DBCP
>          Issue Type: Bug
>    Affects Versions: 2.8.0
>            Reporter: Erol Guven
>            Assignee: Phil Steitz
>            Priority: Major
>
> when the database does not respond within a time-out period, the connection 
> pool seems to still keep the connection in its pool and consider it active. 
> These active connections are never closed and seems to be kept in the pool 
> forever.
> To reproduce:
>  * create a BasicDataSource
>  * suspend the database process using {{kill -STOP}} signal
>  * get a connection from multiple threads simultaneously which will timeout
>  * inspect org.apache.commons.pool2.impl.GenericObjectPool.getNumActive()
> The active count is equivalent to the number of timed out connections.
> The active count never goes down.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to