commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nitin Dubey" <>
Subject DBCP Idle Connections Problem - Msg Updated
Date Wed, 23 Nov 2005 14:08:20 GMT

I have configured DBCP with Spring Framework in one of our applications.
The time DBCP takes to return a connection is unpredictable.  Sometimes it
gets the connection instantly and sometimes it takes 40-60 seconds.  The
statement that is causing the delay is dataSource.getConnection();

When the application is not used for say 30 mins then the first request
after that will be slow.  All the requests after that will be served fast.

Has anyone faced this kind of problem ?  Let me know how should I go ahead.
Following are the parameters I pass to DBCP.

	<bean id="oracleDataSource" class="org.apache.commons.dbcp.BasicDataSource"
		<property name="driverClassName">
		<property name="url">
		<property name="username">
		<property name="password">
		<property name="initialSize">
		<property name="maxActive">
		<property name="maxIdle">
		<property name="maxWait">
		<property name="validationQuery">
			<value>SELECT 1 from dual</value>
		<property name="testOnBorrow">
		<property name="testWhileIdle">


- nitin

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

View raw message