We have services written in Springboot 2 and we are using SQL Server as backend database
Hikaricp is 3.4.1 [compile] - Comes with spring-boot-starter-jdbc: 2.2.1.RELEASE Microsoft SQL Server 2014 Springboot 2.2.1
2 Issues:
- The Hikari Get connection is taking some times more than 4 sec's intermittently (Java/com.zaxxer.hikari.HikariDataSource/getConnection)
- Failed to validate connection ConnectionID:XXXX(The connection is closed.). Possibly consider using a shorter maxLifetime value.
minimum-idle:3 maximum-pool-size: 25 connection-timeout: 60000 idle-timeout: 60000 max-lifetime: 6000 allow-pool-suspension: true register-mbeans: true leak-detection-threshold: 60000
We have enabled Debug logs to capture any leaked detections but nothing was observed
Comment From: wilkinsona
Thanks for the report. Unfortunately, it's not clear to me why you believe this is a Spring Boot issue. Once Hikari's been configured, Spring Boot isn't involved with it retrieving connections to the database. I think the most likely source of the problem is the database itself or the network connection between your application and the database. The next most likely cause is Hikari itself although I think that's quite unlikely.
It appears that SQL Server is closing connections when Hikari expects them to have been left open. Perhaps you can enable some logging or other diagnostics on the database to identify why it is closing the connections. Perhaps that's a mismatch in configuration between the two.
I'm going to close this issue as it doesn't appear to be caused by Spring Boot itself. If you can provide us with something that shows things working without Spring Boot but failing with it then we can take another look.