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
at
org.apache.commons.dbcp.PoolDataSource.getConnection(PoolingDataSource.java:114)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
...
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"
destroy-method="close">
<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"/>
</bean>
How can I prevent it from generating continuously?
I have a feeling of doubt about my maxWait and
timeBetweenEvictionRunsMillis.
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
issue.
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.
regards,
sic
--
View this message in context:
http://apache-commons.680414.n4.nabble.com/DBCP-getConnection-Timeout-tp2525029p2525029.html
Sent from the Commons - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]