这个报错的原因是连接池中的一个连接在使用之前无法通过验证。可能的原因是连接已经超时,或者服务器配置的等待超时时间已经超过了最大等待时间。可以通过以下方式解决问题:

  1. 在应用程序中,在使用连接之前验证连接的有效性。
  2. 增加服务器配置中的客户端超时时间。
  3. 使用Connector/J连接属性“autoReconnect=true”来避免这个问题。
  4. 考虑使用更短的maxLifetime值。
这个报错什么原因 HikariPool-1 - Failed to validate connection commysqlcjjdbcConnectionImpl73eb5f77 The last packet successfully received from the server was 185233 milliseconds ago The last packet sent succes

原文地址: https://www.cveoy.top/t/topic/gDIt 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录