brettwooldridge / HikariCP

光 HikariCP・A solid, high-performance, JDBC connection pool at last.
Apache License 2.0
19.84k stars 2.92k forks source link

Failed to validate connection Pooled connection wrapping physical connection (Connection has been closed.). Possibly consider using a shorter maxLifetime value. #1755

Open GiovanniMelissari opened 3 years ago

GiovanniMelissari commented 3 years ago

Hi everybody, I am working on a Spring MVC project (Spring version 4.1.1) and I configured HikariCP as connection pool manager. When the application is not used for a while, it seems like Hikari starts loosing connections with DB, and when I try to connect to the web app, Tomcat shows this: image

Here is my Hikari datasource configuration for Spring: image

I already tried to use shorter maxLifetime values, as suggested by the stacktrace, but it did not make any difference.

Could anybody please help me resolving this issue? What am I doing wrong?

Other useful info:

swhr0903 commented 2 years ago

I also encountered the same problem, did you solve this problem?

GiovanniMelissari commented 2 years ago

@swhr0903 No. Problem still remains and no one was able to help me :(