뭐든 즐기면서 ;)

Error org.springframework.dao.RecoverableDataAccessException 본문

Error

Error org.springframework.dao.RecoverableDataAccessException

Tada.*+ 2022. 9. 20. 19:36
728x90

Error

Request processing failed; nested exception is org.springframework.dao.RecoverableDataAccessException:
 ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
 The last packet successfully received from the server was933 seconds ago.The last packet sent
 successfully to the server was 933 seconds ago, which is longer than the server configured
 value of 'wait_timeout'. You should consider either expiring and/or testing connection
 validity before use in your application, increasing the server configured values for client
 timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this
 problem. ### The error may exist in class path resource [query/mysql/common/C1.seq.sql.xml]
 ### The error may involve ai.mindslab.gather.common.comm.dao.SeqDao.callNextSeq-Inline
 ### The error occurred while setting parameters ### SQL: SELECT selectNextSeq(?) ### Cause:
 com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received
 from the server was933 seconds ago.The last packet sent successfully to the server was 933 seconds
 ago, which is longer than the server configured value of 'wait_timeout'. You should consider
 either expiring and/or testing connection validity before use in your application, increasing
 the server configured values for client timeouts, or using the Connector/J connection
 property 'autoReconnect=true' to avoid this problem. ; SQL []; The last packet successfully
 received from the server was933 seconds ago.The last packet sent successfully to the server
 was 933 seconds ago, which is longer than the server configured value of 'wait_timeout'.
 You should consider either expiring and/or testing connection validity before use in your
 application, increasing the server configured values for client timeouts, or using the
 Connector/J connection property 'autoReconnect=true' to avoid this problem.; nested exception
 is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully
 received from the server was933 seconds ago.The last packet sent successfully to the server
 was 933 seconds ago, which is longer than the server configured value of 'wait_timeout'.
 You should consider either expiring and/or testing connection validity before use in your
 application, increasing the server configured values for client timeouts, or using the
 Connector/J connection property 'autoReconnect=true' to avoid this problem.

주의해서 볼 에러 내용

which is longer than the server configured value of 'wait_timeout'.
You should consider either expiring and/or testing connection validity before use in your
application, increasing the server configured values for client timeouts, or using the
Connector/J connection property 'autoReconnect=true' to avoid this problem.

오류 해결 방법

     1. jdbc.url 에 autoReconnect=true로 변경

     2. db 설정파일에서 wait_timeout 값을 늘려주면 됩니다.. wait_timeout의 단위는 초단위입니다.

* 설정파일의 경로는 세팅에 따라 달라지기 때문에 생략 합니다.

728x90
Comments