DBILITY

java spring atomikos Connection Pool Exhausted Exception 본문

java/basic

java spring atomikos Connection Pool Exhausted Exception

DBILITY 2016. 9. 23. 21:31
반응형

3.9.3버전 사용중 Connection Pool Exhausted Exception 발생

4.X, 3.9.X, 3.8.0 버전교체 및 Log Level DEBUG 모니터링 결과 개발환경테스트 초기에 사용되었던 3.8.0만 문제없음.

테스트 결과 Global Transaction의 Participants가 모두 READONLY일 경우

Pool Resource가 Return되지 않는 경우가 발생하였습니다.

변경 후 테스트환경 하에서 6일간 실행결과 Connection Pool의 증감이 정상임을 확인하였습니다.



테스트 환경
5분단위 5초간격 3개 스케줄당 300,000건 SELECT, XML생성(파일당 999건) 및 완료 후 즉시 삭제 

com.atomikos.jdbc.AtomikosDataSourceBean

minPoolSize 1,maxPoolSize 5 다른 속성은 Default

com.atomikos.icatch.config.UserTransactionServiceImp 
com.atomikos.icatch.threaded_2pc = false
com.atomikos.icatch.max_timeout = 600000

com.atomikos.icatch.jta.UserTransactionImp의 
transactionTimeout = 600

11:56:13.147 [Atomikos:0] DEBUG  c.a.datasource.pool.ConnectionPool - atomikos connection pool 'oracleXA_DB1': trying to shrink pool
11:56:13.147 [Atomikos:0] DEBUG  c.a.datasource.pool.ConnectionPool - atomikos connection pool 'oracleXA_DB1': connection idle for 23445ms
11:56:13.147 [Atomikos:0] DEBUG  c.a.datasource.pool.ConnectionPool - atomikos connection pool 'oracleXA_DB1': connection idle for 28092ms
11:56:14.636 [Atomikos:1] DEBUG  c.a.datasource.pool.ConnectionPool - atomikos connection pool 'oracleXA_DB2': trying to shrink pool
11:56:14.637 [Atomikos:1] DEBUG  c.a.datasource.pool.ConnectionPool - atomikos connection pool 'oracleXA_DB2': connection idle for 24967ms
11:56:14.637 [Atomikos:1] DEBUG  c.a.datasource.pool.ConnectionPool - atomikos connection pool 'oracleXA_DB2': connection idle for 29631ms
11:57:13.147 [Atomikos:0] DEBUG  c.a.datasource.pool.ConnectionPool - atomikos connection pool 'oracleXA_DB1': trying to shrink pool
11:57:13.148 [Atomikos:0] DEBUG  c.a.datasource.pool.ConnectionPool - atomikos connection pool 'oracleXA_DB1': connection idle for 83446ms
11:57:13.148 [Atomikos:0] DEBUG  c.a.datasource.pool.ConnectionPool - atomikos connection pool 'oracleXA_DB1': connection idle for more than 60s, closing it: an AtomikosXAPooledConnection with a SessionHandleState with 0 context(s)
11:57:13.148 [Atomikos:0] DEBUG c.a.jdbc.AtomikosXAPooledConnection - an AtomikosXAPooledConnection with a SessionHandleState with 0 context(s): destroying connection...
11:57:13.151 [Atomikos:0] DEBUG  c.a.datasource.pool.ConnectionPool - atomikos connection pool 'oracleXA_DB1': connection idle for 88096ms
11:57:14.637 [Atomikos:1] DEBUG  c.a.datasource.pool.ConnectionPool - atomikos connection pool 'oracleXA_DB2': trying to shrink pool
11:57:14.638 [Atomikos:1] DEBUG  c.a.datasource.pool.ConnectionPool - atomikos connection pool 'oracleXA_DB2': connection idle for 84968ms
11:57:14.638 [Atomikos:1] DEBUG  c.a.datasource.pool.ConnectionPool - atomikos connection pool 'oracleXA_DB2': connection idle for more than 60s, closing it: an AtomikosXAPooledConnection with a SessionHandleState with 0 context(s)
11:57:14.638 [Atomikos:1] DEBUG c.a.jdbc.AtomikosXAPooledConnection - an AtomikosXAPooledConnection with a SessionHandleState with 0 context(s): destroying connection...
11:57:14.641 [Atomikos:1] DEBUG  c.a.datasource.pool.ConnectionPool - atomikos connection pool 'oracleXA_DB2': connection idle for 89635ms
11:58:13.152 [Atomikos:0] DEBUG  c.a.datasource.pool.ConnectionPool - atomikos connection pool 'oracleXA_DB1': trying to shrink pool
11:58:14.641 [Atomikos:1] DEBUG  c.a.datasource.pool.ConnectionPool - atomikos connection pool 'oracleXA_DB2': trying to shrink pool

사용시 atomikos 라이센스정책을 참고하세요.

https://www.atomikos.com/Main/WhichLicenseApplies

반응형

'java > basic' 카테고리의 다른 글

java swing file open  (0) 2016.10.28
maven jar build시 meta-inf 제거  (0) 2016.10.21
maven jar packaging specific class excluding ( java 클래스 제외 )  (0) 2016.10.03
maven build scp copy  (0) 2016.09.20
javamail gmail smtp error  (0) 2016.09.20
Comments