Spring Batch 개별 step 돌릴땐 괜찮은데 전체 step이 돌지 않는다!
첫번째 에러 상황
Caused by: org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms.
at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:305)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.startTransaction(AbstractPlatformTransactionManager.java:400)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373)
at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:574)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:361)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy78.update(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.batch.core.configuration.annotation.SimpleBatchConfiguration$PassthruAdvice.invoke(SimpleBatchConfiguration.java:127)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy78.update(Unknown Source)
at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:196)
at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148)
at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:68)
at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:68)
at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:169)
... 5 common frames omitted
logback-spring.xml에 아래 코드 추가하여 로그 남겨보기
<logger name="com.zaxxer.hikari" level="debug" additivity="false">
<appender-ref ref="stdout"/>
</logger>
남은 로그
2021-04-23 03:05:50 DEBUG [HikariPool-2 housekeeper] (HikariPool.java:421) - HikariPool-2 - Pool stats (total=10, active=0, idle=10, waiting=0)
2021-04-23 03:05:50 DEBUG [HikariPool-2 housekeeper] (HikariPool.java:517) - HikariPool-2 - Fill pool skipped, pool is at sufficient level.
2021-04-23 03:05:52 DEBUG [HikariPool-3 housekeeper] (HikariPool.java:421) - HikariPool-3 - Pool stats (total=30, active=0, idle=30, waiting=0)
2021-04-23 03:05:52 DEBUG [HikariPool-3 housekeeper] (HikariPool.java:517) - HikariPool-3 - Fill pool skipped, pool is at sufficient level.
2021-04-23 03:06:02 DEBUG [HikariPool-1 housekeeper] (HikariPool.java:421) - HikariPool-1 - Pool stats (total=10, active=10, idle=0, waiting=2)
2021-04-23 03:06:02 DEBUG [HikariPool-1 housekeeper] (HikariPool.java:517) - HikariPool-1 - Fill pool skipped, pool is at sufficient level.
2021-04-23 03:06:03 DEBUG [SimpleAsyncTaskExecutor-21] (HikariPool.java:421) - HikariPool-1 - Timeout failure stats (total=10, active=10, idle=0, waiting=1)
2021-04-23 03:06:03 ERROR [SimpleAsyncTaskExecutor-21] (Slf4jSpyLogDelegator.java:130) - null. DataSource.getConnection()
java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30001ms.
...?!
hikari connection pool option - k9e4h.tistory.com/372
woowabros.github.io/experience/2020/02/06/hikaricp-avoid-dead-lock.html
mkyong.com/jdbc/hikaripool-1-connection-is-not-available-request-timed-out-after-30002ms/
반응형
'오류관리' 카테고리의 다른 글
Variable used in lambda expression should be final or effectively final (0) | 2021.06.09 |
---|---|
java.lang.OutOfMemoryError: Java heap space (2) | 2021.05.04 |
[MyBatis] Out of range value for column ~~ (0) | 2021.04.16 |
Clone failed - RPC failed (0) | 2021.01.20 |
javax.crypto.AEADBadTagException: Tag mismatch! (0) | 2020.11.03 |