이 문제를 해결하려면 응용 프로그램 구성 파일에서 적절한 연결 속성을 구성하는 것이 좋습니다. Application.Properties) :
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 56,006,037 milliseconds ago. The last packet sent successfully to the server was 56,006,037 milliseconds ago. 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.
# 연결 유효성 검사 및 풀 구성 Spring.datasource.max-Active = 10 spring.datasource.initial-size = 5 spring.datasource.max-idle = 5 spring.datasource.min-idle = 1 # 정기 연결 유효성 검사 spring.datasource.test-while-idle = true spring.datasource.validation-query = select 1 # 유휴 연결 관리 Spring.datasource. 타임-벤드-벤트-런스-밀리 스 = 5000 Spring.datasource.min-Evictable-Idle-Millis = 60000
이 설정은 연결 풀을 다음과 같이 가능하게합니다. (Spring.datasource.test-While-Idle). 비활성의 장기간 후에도 데이터베이스 연결.
부인 성명: 제공된 모든 리소스는 부분적으로 인터넷에서 가져온 것입니다. 귀하의 저작권이나 기타 권리 및 이익이 침해된 경우 자세한 이유를 설명하고 저작권 또는 권리 및 이익에 대한 증거를 제공한 후 이메일([email protected])로 보내주십시오. 최대한 빨리 처리해 드리겠습니다.
Copyright© 2022 湘ICP备2022001581号-3