You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by MC Sekhar <mc...@medicomsoft.com> on 2004/10/11 05:56:01 UTC

[dbcp] BasicDataSource Hangs

Hi,

	We have a product in healthcare completely written using J2EE. We are
currently running the product on Oracle 9iAS and Oracle 8.1.7.4 database
enterprise edition. We are using the Thin driver to connect to the database.
Due to teh problems with Oracle's connection cache implementations, wer
switched to DBCP for the connection pooling. At our development labs, we
donot have any issues and the pooling works fine. But when we put DBCP in
our production sites we are having a major problem, even with a concurrent
user load of 20 to 50(we are unable to simulate this in our development
labs).

	From the feedback we have got from the customer, when there is a resource
intensive query, taking up much of the resources on the database server,
DBCP refuses any new connection requests. This has been reported even when
there are about  10 Db connections in the pool. But they are able to connect
to the database using the SQLPlus Client. The following is the datasource
definition,

  		<data-source
			name = "BasicDataSource"
			class = "org.apache.commons.dbcp.BasicDataSource"
			connection-driver = "oracle.jdbc.driver.OracleDriver"
			url = "jdbc:oracle:thin:@<machine_ip>:<port_no>:<sid>"
			connection-retry-interval = "1"
			location = "jdbc/OracleDS"
			username="<user_id>"
			password="<password>"
			>

			<property name="username" value="<user_id>" />
			<property name="password" value="<password>" />
			<property name="url"
value="jdbc:oracle:thin:@<machine_ip>:<port_no>:<sid>" />
			<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"
/>

			<property name="defaultAutoCommit" value="true" />

			<property name="initialSize" value="10" />
			<property name="maxActive" value="0" />
			<property name="maxIdle" value="0" />
			<property name="minIdle" value="0" />
			<property name="maxWait" value="60" />

			<property name="validationQuery" value="Select 1 from dual" />
			<property name="testOnBorrow" value="true" />
			<property name="testOnReturn" value="true" />
			<property name="testWhileIdle" value="true" />
			<property name="timeBetweenEvictionRunsMillis" value="60000" />
			<property name="numTestsPerEvictionRun" value="5" />
			<property name="minEvictableIdleTimeMillis" value="600000" />

			<property name="poolPreparedStatements" value="false" />
			<property name="maxOpenPreparedStatements" value="100" />

			<property name="accessToUnderlyingConnectionAllowed" value="false" />

			<property name="removeAbandoned" value="true" />
			<property name="removeAbandonedTimeout" value="180" />
			<property name="logAbandoned" value="true" />

		</data-source>

 Any suggestions ??

 Thanks in advance.

 Regards
 Chandra Sekhar


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org