운영배치
- 작성자 :
- 제*
- 작성일 :
- 2023-07-28 00:16:29
- 조회수 :
- 629
- 구분 :
- 운영환경 / 배치운영환경 3.7
- 진행상태 :
- 완료
Q
안녕하세요.
배치를 세팅해서 테스트 중입니다.
로컬에서 대량의 데이타 처리도 정상적으로 잘 됩니다.
-정상적인 경우
DEBUG [egovframework.batch.xxxx.xxxxProcessor] infCommonVO toString [19895]:egovframework.batch.InfCommonVO@1d0b9178[apiNo=112,attrVal1=8808983130415]
DEBUG [org.mybatis.spring.SqlSessionUtils] Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@361ba78d] from current transaction
DEBUG [infCommon.insertxxxx] ==> Parameters: 20230727100000002941(String), 8808983130415022910000245982001000(String), 112(String), N(String), 8808983130415(String)
DEBUG [org.mybatis.spring.SqlSessionUtils] Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@361ba78d]
DEBUG [egovframework.batch.xxxx.xxxxProcessor] Class.forName success!
개발환경에서는 약 4만건을 입력 실행하는데 2만건 정도 되는 시점에 아래와 같은 오류가 납니다.
위에 정상적인 부분과 비교를 해보면 transactional SqlSession 이 문제가 있는걸로 보이는데 어떤 원인인지는 잘 모르겠습니다.
-오류가 나는 부분이
DEBUG [egovframework.batch.xxxx.xxxxProcessor] infCommonVO toString [19895]:egovframework.batch.InfCommonVO@1d0b9178[apiNo=112,attrVal1=8808983130415]
DEBUG [org.mybatis.spring.SqlSessionUtils] Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@361ba78d] from current transaction
DEBUG [jdbc.audit]2.PreparedStatement.getQueryTimeout() returned 0 org.apache.commons.dbcp2.DelegatingsStatement.getQueryTimeOut(DelegatingStatement.java:300)
DEBUG [jdbc.audit]2.PreparedStatement.setString(1,"20230727100000002944") returned org.apache.commons.dbcp2.DelegatingsStatement.setString(DelegatingPreparedSatement.java:192)
배치를 세팅해서 테스트 중입니다.
로컬에서 대량의 데이타 처리도 정상적으로 잘 됩니다.
-정상적인 경우
DEBUG [egovframework.batch.xxxx.xxxxProcessor] infCommonVO toString [19895]:egovframework.batch.InfCommonVO@1d0b9178[apiNo=112,attrVal1=8808983130415]
DEBUG [org.mybatis.spring.SqlSessionUtils] Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@361ba78d] from current transaction
DEBUG [infCommon.insertxxxx] ==> Parameters: 20230727100000002941(String), 8808983130415022910000245982001000(String), 112(String), N(String), 8808983130415(String)
DEBUG [org.mybatis.spring.SqlSessionUtils] Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@361ba78d]
DEBUG [egovframework.batch.xxxx.xxxxProcessor] Class.forName success!
개발환경에서는 약 4만건을 입력 실행하는데 2만건 정도 되는 시점에 아래와 같은 오류가 납니다.
위에 정상적인 부분과 비교를 해보면 transactional SqlSession 이 문제가 있는걸로 보이는데 어떤 원인인지는 잘 모르겠습니다.
-오류가 나는 부분이
DEBUG [egovframework.batch.xxxx.xxxxProcessor] infCommonVO toString [19895]:egovframework.batch.InfCommonVO@1d0b9178[apiNo=112,attrVal1=8808983130415]
DEBUG [org.mybatis.spring.SqlSessionUtils] Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@361ba78d] from current transaction
DEBUG [jdbc.audit]2.PreparedStatement.getQueryTimeout() returned 0 org.apache.commons.dbcp2.DelegatingsStatement.getQueryTimeOut(DelegatingStatement.java:300)
DEBUG [jdbc.audit]2.PreparedStatement.setString(1,"20230727100000002944") returned org.apache.commons.dbcp2.DelegatingsStatement.setString(DelegatingPreparedSatement.java:192)
환경정보
-
- OS 정보 : 유닉스
- 표준프레임워크 버전 : 4
- JDK(JRE) 정보 :
- WAS 정보 :
- DB 정보 :
- 기타 환경 정보 :
A
안녕하세요.
표준프레임워크 센터입니다.
첨부해 주신 자료 및 로그만 보고 판단했을 때
쿼리 타임아웃 설정이 되지 않은 것에 반하여
특정 쿼리의 실행시간이 오래 걸리는 것이 원인이라고 추측됩니다.
PreparedStatement.getQueryTimeout() 에 해해서는 다음 링크를 참고 가능합니다.
https://docs.oracle.com/javase/8/docs/api/java/sql/Statement.html#getQueryTimeout--
다만, 오류에 대한 정보가 제한적이므로
정확한 답변이 어려운 점 양해 부탁 드립니다.
ItemReader 사용시
페이징 처리가 가능한 ItemReader를 사용하시는것도 대안이 될듯 합니다.
감사합니다.
표준프레임워크 센터입니다.
첨부해 주신 자료 및 로그만 보고 판단했을 때
쿼리 타임아웃 설정이 되지 않은 것에 반하여
특정 쿼리의 실행시간이 오래 걸리는 것이 원인이라고 추측됩니다.
PreparedStatement.getQueryTimeout() 에 해해서는 다음 링크를 참고 가능합니다.
https://docs.oracle.com/javase/8/docs/api/java/sql/Statement.html#getQueryTimeout--
다만, 오류에 대한 정보가 제한적이므로
정확한 답변이 어려운 점 양해 부탁 드립니다.
ItemReader 사용시
페이징 처리가 가능한 ItemReader를 사용하시는것도 대안이 될듯 합니다.
감사합니다.