commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sic <>
Subject Oracle session excess over maxActive
Date Mon, 08 Mar 2010 10:31:07 GMT

I'm using commons-pool-1.3, commons-dbcp-1.2.2

Our business is quite simple. Using quartz, 30 simpleTriggers(5sec
repeatInterval) are triggered by 10 thread on quartz threadPool.
When any simpleTrigger is fired, it executes a job of doing DB(oracle)
query(select several rows and then update for them).
Configuration is as below :
<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
	<property name="quartzProperties">
			<prop key="org.quartz.threadPool.threadCount">10</prop>
	<property name="triggers">
			... 30 simple triggers ...		
<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="defaultAutoCommit" value="false"/>
        <property name="initialSize" value="10"/>
        <property name="maxActive" value="15"/>
        <property name="maxIdle" value="10"/>
        <property name="minIdle" value="10"/>
        <property name="maxWait" value="60000"/>
        <property name="testWhileIdle" value="false"/>
        <property name="validationQuery" value="select 1 from dual"/>
        <property name="testOnReturn" value="true"/>
        <property name="timeBetweenEvictionRunsMillis" value="10000"/>
        <property name="removeAbandoned" value="true"/>
        <property name="removeAbandonedTimeout" value="10"/>
        <property name="logAbandoned" value="true"/>

by this configuration, 10 threads are executed by using 10~15 connections
after firing at 30 triggers.
On rare occasion, however, DB sessions(confusing connection and session) are
not closed normally and the result is that they occupy a tremendous amount
of sessions.

As a result of inquiring of DB "select * from v$session", it presents the
maximum number of session(more than 1000) allowed to this user and remains
INACTIVE status. And this status cannot be resolved until we shutdown this

What causes this abnormal states? We certainly expected that DB pool can
limit the number of Active session by the "maxActive" property no matter
what may happen, but it seems not to work occasionally.

Any advice about this matter..



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