문서의 이전 판입니다!
numTestsPerEvictionRun
: -1
을 주면 매번 전체 idle 커넥션에 대한 eviction 테스트를 진행하며 이 경우에는 성능저하가 있을 수 있음.timeBetweenEvictionRunsMillis
: numTestsPerEvictionRun
이 작은 상태에서 이 값도 작으면 오랜시간 idle 상태로 유지되면서 비정상 커넥션으로 떨어질 가능성이 높아짐.numTestsPerEvictionRun
는 작게(3 정도?), timeBetweenEvictionRunsMillis
도 작게(5000ms 정도?)로 주는 것이 좋다.java.lang.Exception: The lifetime of the connection [300,008] milliseconds exceeds the maximum permitted value of [300,000] milliseconds
와 같은 WARN 메시지 발생 maxConnLifetimeMillis
보다 오래 살아남은 커넥션에 대한로그임.