You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Emma <po...@gmail.com> on 2008/10/16 07:31:04 UTC

How does DBCP handle Idle connections

Originally the application faces connection reset problems
using the configuration:

                type="javax.sql.DataSource" removeAbandoned="true"
                removeAbandonedTimeout="100" maxActive="500"
                maxIdle="10" maxWait="1000"

because the opened connections are closed by the server and the DBCP
return a closed connection

Therefore we switch to a ne conf using:

                type="javax.sql.DataSource" removeAbandoned="true"
                removeAbandonedTimeout="100" maxActive="500"
                maxIdle="10" maxWait="1000"
                validationQuery="insert into conntest (name) values
('test'); select 1;"
                testOnBorrow="false"
                testWhileIdle="true"
                timeBetweenEvictionRunsMillis="240000"
                numTestsPerEvictionRun="10"

So we run the connection test while the connection is idle every 4min.
<the server timeout is set to 5 minutes>

But we find that the insert statement only insert function for the
first 30 minutes
Then all the connection are closed, and the pool is empty.

Can anyone explain the suituation?

Thank you

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org