why the db connections in jboss7.1 datasource pool were increasing all time and Jboss crashed at last??
rtskoo Jun 27, 2013 9:13 AMI found in jboss-app-console that the connection in db pool were increasing until to the max value and jboss was not able to conection to database finally .what is the problem,please??(There were 100+ clients who connected to the server and about 100-200 TCP connections as result).
(1) I got lot of trace info in log file like this about the db pool :
[10:49:06,097] TRACE [org.jboss.jca.core.connectionmanager.listener.TxConnectionListener] (http--0.0.0.0-80-11) connectionClosed called mc=org.jboss.jca.adapters.jdbc.local.LocalManagedConnection@7ae7b3a7
[10:49:06,098] TRACE [org.jboss.jca.core.api.connectionmanager.ccm.CachedConnectionManager] (http--0.0.0.0-80-11) unregistering connection from connection manager: org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl@15881ebc, connection: org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6@3c145831, key: null
[10:49:06,098] TRACE [org.jboss.jca.core.connectionmanager.listener.TxConnectionListener] (http--0.0.0.0-80-11) unregisterConnection: 0 handles left
[10:49:06,098] TRACE [org.jboss.jca.core.connectionmanager.listener.TxConnectionListener] (http--0.0.0.0-80-11) isManagedConnectionFree=false mc=org.jboss.jca.adapters.jdbc.local.LocalManagedConnection@7ae7b3a7
[10:49:06,102] TRACE [org.jboss.jca.core.connectionmanager.listener.TxConnectionListener] (http--0.0.0.0-80-11) afterCompletion(3) isTrackByTx=true for org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@506c5f58[state=NORMAL managed connection=org.jboss.jca.adapters.jdbc.local.LocalManagedConnection@7ae7b3a7 connection handles=0 lastUse=1372301316857 trackByTx=true pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@337b6361 pool internal context=SemaphoreArrayListManagedConnectionPool@1a178ca0[pool=OraEfrDS] xaResource=LocalXAResourceImpl@1c3d7fb[connectionListener=506c5f58 connectionManager=15881ebc warned=false currentXid=null] txSync=null]
[10:49:06,103] TRACE [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (http--0.0.0.0-80-11) ManagedConnectionPool: 1a178ca0
Method: returnConnection(506c5f58, false)
ManagedConnectionFactory:
Class: org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory
Object: 1017bad0
ConnectionListenerFactory:
Class: org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl
Object: 15881ebc
Pool:
Name: OraEfrDS
PoolConfiguration:
MinSize: 3
MaxSize: 60
BlockingTimeout: 120000
IdleTimeoutMinutes: 3
BackgroundValidation: false
BackgroundValidationMillis: 0
StrictMin: false
UseFastFail: false
Available:
72d43ffa (NORMAL)
6d8b8ed1 (NORMAL)
InUse:
506c5f58 (NORMAL)
Statistics:
ActiveCount: 3
AvailableCount: 59
AverageBlockingTime: 0
AverageCreationTime: 40
CreatedCount: 528
DestroyedCount: 525
MaxCreationTime: 212
MaxUsedCount: 2
MaxWaitCount: 0
MaxWaitTime: 1
TimedOut: 525
TotalBlockingTime: 6
TotalCreationTime: 21197
[10:49:06,105] TRACE [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (http--0.0.0.0-80-11) Returning connection to pool org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@506c5f58[state=NORMAL managed connection=org.jboss.jca.adapters.jdbc.local.LocalManagedConnection@7ae7b3a7 connection handles=0 lastUse=1372301346105 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@337b6361 pool internal context=SemaphoreArrayListManagedConnectionPool@1a178ca0[pool=OraEfrDS] xaResource=LocalXAResourceImpl@1c3d7fb[connectionListener=506c5f58 connectionManager=15881ebc warned=false currentXid=null] txSync=null] .
(2) My datasource pool is configured in jboss7.1 as follow:
<subsystem xmlns="urn:jboss:domain:datasources:1.0"> | |
<datasources> | |
<datasource jta="true" jndi-name="java:jboss/datasources/OraEfrDS" pool-name="OraEfrDS" enabled="true" use-java-context="true" spy="true" use-ccm="true"> | |
<connection-url>jdbc:oracle:thin:@127.0.0.1:1521:aa</connection-url> | |
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class> | |
<driver>oracle</driver> | |
<new-connection-sql>call DBMS_APPLICATION_INFO.SET_MODULE('MyApp','java:jboss/datasources/OraEfrDS')</new-connection-sql> | |
<pool> | |
<min-pool-size>10</min-pool-size> | |
<max-pool-size>500</max-pool-size> | |
<prefill>true</prefill> | |
<use-strict-min>false</use-strict-min> | |
<flush-strategy>FailingConnectionOnly</flush-strategy> | |
</pool> | |
<security> | |
<user-name>test</user-name> | |
<password>test</password> | |
</security> | |
<validation> | |
<check-valid-connection-sql>select 1 from dual</check-valid-connection-sql> | |
<validate-on-match>false</validate-on-match> | |
<background-validation>false</background-validation> | |
<use-fast-fail>false</use-fast-fail> | |
<stale-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleStaleConnectionChecker"/> | |
<exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"/> | |
</validation> | |
<timeout> | |
<blocking-timeout-millis>120000</blocking-timeout-millis> | |
<idle-timeout-minutes>1</idle-timeout-minutes> | |
</timeout> | |
<statement> | |
<prepared-statement-cache-size>100</prepared-statement-cache-size> | |
</statement> | |
</datasource> |