사용자 도구

사이트 도구


java:database:dbcp

문서의 이전 판입니다!


DBCP - Java Connection Pool

Eviction 정책

  • numTestsPerEvictionRun : -1을 주면 매번 전체 idle 커넥션에 대한 eviction 테스트를 진행하며 이 경우에는 성능저하가 있을 수 있음.
  • timeBetweenEvictionRunsMillis : numTestsPerEvictionRun이 작은 상태에서 이 값도 작으면 오랜시간 idle 상태로 유지되면서 비정상 커넥션으로 떨어질 가능성이 높아짐.
  • 결국, numTestsPerEvictionRun는 작게(3 정도?), timeBetweenEvictionRunsMillis 도 작게(5000ms 정도?)로 주는 것이 좋다.

maxConnLifetimeMillis 오류로그

  • java.lang.Exception: The lifetime of the connection [300,008] milliseconds exceeds the maximum permitted value of [300,000] milliseconds 와 같은 WARN 메시지 발생

참고

java/database/dbcp.1444298518.txt.gz · 마지막으로 수정됨: 2015/10/08 18:31 저자 kwon37xi