본문 바로가기

WAS/Weblogic

[Weblogic] JDBC pool connecton leak was detected

반응형

 

Weblogic에서 JDBC Connection의 Leak 여부를 감지하고, 애플리케이션에서 leak connection을 유발하는 stacktrace를 로그에 출력하는 방법

 

※ JDBC Conntecton Leak 이란?

- DB 접근을 위해 Connection Pool 자원을 사용하는데 이를 반납하지 않아, 사용 가능한 Connection Pool을 지속적으로 줄어드는 현상을 말한다.

 

[ Weblogic 12c 환경 ]

웹로직 콘솔 > JDBC > 구성 > 진단 > "누수 접속 프로파일" 체크

 

누수 접속 프로파일 옵션 체크를 하면 Connecton Leak 의심될 때 아래와 같은 로그 발생

(WAS Log에서 leak 단어로 검색 가능)

 

<Warning> <JDBC> <BEA-001074> <A JDBC pool connection leak was detected. A connection leak occurs when a connection obtained from the pool was not closed explicitly by calling close() and then was disposed by the garbage collector and returned to the connection pool. The following stack trace at create shows where the leaked connection was created.

 

반응형