1

My application used DBCP1.4, hibernate and spring, connects to oracle. under common load of few hundered req/sec i get too many TCP connections to the DB (resulting in excessive system usage upon DB side for authentication, 95% cpu for 16 cores machine). over 80 connections/sec each connection serves few requests and FIN from client side. each session is only 15-20 ms. I'd like to tune the DBCP or oracle driver (don't know which one is responsible for this) to cary each connection for longer time (thinking of 5-10 seconds at least) how can i get this? the pool settings in DBCP is

    <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>     
    <property name="initialSize" value="10"/>
    <property name="maxActive" value="100"/>
    <property name="maxIdle" value="100"/>
    <property name="maxWait" value="5000"/>
    <property name="removeAbandoned" value="true"/>
    <property name="removeAbandonedTimeout" value="60"/>
    <property name="logAbandoned" value="false"/>
    <property name="validationQuery" value="select 1 from dual"/>
    <property name="testOnBorrow" value="true"/>
    <property name="testWhileIdle" value="true"/>
    <property name="numTestsPerEvictionRun" value="2"/>
    <property name="timeBetweenEvictionRunsMillis" value="-1"/>
    <property name="minEvictableIdleTimeMillis" value="600000"/>
    <property name="validationQueryTimeout" value="5"/>
    <property name="poolPreparedStatements" value="false"/>

spring's thread executor settings is -

     <property name="connectionGetterExecutor">
        <bean class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
            <property name="corePoolSize" value="15"/>
            <property name="maxPoolSize" value="100"/>
            <property name="queueCapacity" value="10000"/>
        </bean>
    </property>
arik yakir
  • 11
  • 2

0 Answers0