commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sic <>
Subject [DBCP] getConnection Timeout
Date Fri, 03 Sep 2010 02:20:46 GMT

I'm using dbcp on the web application server whose version is
commons-dbcp-1.3, commons-pool-1.5.4 on jdk1.5.

It can be used to execute some DML statements when receiving about 30 ~ 150
number of data(data is less than 3 KB) peridically per minute

Expected to do these simple works with no difficulties, it generated some
errors occasionally(50 ~ 150 per day).

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
error Timeout waiting for idle object

The web application server could use 30 threads at most, using oracle DB and
the configurations are following:

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
	<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" /> 
	<property name="url" value="..." /> 
	<property name="username" value="..." /> 
	<property name="password" value="..." /> 
	<property name="initialSize" value="5"/> 
	<property name="maxActive" value="30"/> 
	<property name="maxIdle" value="30"/> 
	<property name="minIdle" value="5"/> 
	<property name="maxWait" value="10000"/> 
	<property name="testWhileIdle" value="true"/> 
	<property name="validationQuery" value="select 1 from dual"/> 
	<property name="testOnReturn" value="true"/> 
	<property name="timeBetweenEvictionRunsMillis" value="10000"/>

How can I prevent it from generating continuously?

I have a feeling of doubt about my maxWait and
Surely I guess, if I change the maxWait value more sufficiently, it would be
generated much less than the present, which is just a temporary resolution.
I'm not certain whether timeBetweenEvictionRunsMillis has influence on this

And I have to put a lot of effort as it has already run for a long time, not
easy to change something.

I appreciate somebody make a helpful advice for that issue.


View this message in context:
Sent from the Commons - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message