commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sic <sic_1...@naver.com>
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">
		<props>
			<prop key="org.quartz.threadPool.threadCount">10</prop>
		</props>
	</property>
	<property name="triggers">
		<list>
			... 30 simple triggers ...		
		</list>
	</property>
</bean>
<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="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"/>
</bean>

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
process.

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..

regards,

sic

-- 
View this message in context: http://n4.nabble.com/Oracle-session-excess-over-maxActive-tp1584311p1584311.html
Sent from the Commons - User mailing list archive at Nabble.com.

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


Mime
View raw message