From db1999175a6ad77974e65b02a7c681a2212d232f Mon Sep 17 00:00:00 2001 From: infraurp Date: Wed, 26 Aug 2026 15:29:53 +0900 Subject: [PATCH] =?UTF-8?q?DB=20=EC=BB=A4=EB=84=A5=EC=85=98=20=ED=92=80?= =?UTF-8?q?=EC=97=90=20=EC=9C=A0=ED=9A=A8=EC=84=B1=20=EA=B2=80=EC=82=AC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20(validationQuery)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DBCP 는 validationQuery 가 없으면 testWhileIdle 을 켜도 아무 검사도 하지 않는다. 종전에는 validationQuery 가 주석 처리돼 있고 검사 주기가 10000000ms(약 2.8시간) 이라 사실상 무검사였다. MySQL·MariaDB 의 wait_timeout 은 기본 8시간이므로 야간처럼 오래 논 뒤 첫 요청이 서버가 이미 끊은 커넥션을 받아 실패한다. 실제 발생: 2026-08-26 AccessLogDownloadJobWorker unexpected end of stream, read 0 bytes (socket was closed by server) - validationQuery = SELECT 1 (종전 주석의 'select 1 from dual' 은 Oracle 표기) - validationQueryTimeout 3초, testOnBorrow 켬 - 유휴 검사 주기 2.8시간 → 5분, 유휴 정리 기준 30분 commons-dbcp 1.3 의 BasicDataSource 에 네 setter 가 모두 존재함을 jar 로 확인했다 (없는 프로퍼티를 넣으면 컴파일은 통과하고 WAS 기동 때만 터진다). Co-Authored-By: Claude Opus 5 --- .../spring/com/context-datasource.xml | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/main/resources/egovframework/spring/com/context-datasource.xml b/src/main/resources/egovframework/spring/com/context-datasource.xml index e6740ee..1b165ff 100644 --- a/src/main/resources/egovframework/spring/com/context-datasource.xml +++ b/src/main/resources/egovframework/spring/com/context-datasource.xml @@ -19,9 +19,25 @@ - + + + + + + - + + +