'How to fixed Failed to obtain JDBC connection ; nested exception in a java.sql.SQLTransientConnectionException:HikariPool-1?
I am getting below error when number of user hitting the application will increase .
Restart will help to solve the issue for some time and again facing same issue when more user trying to access the application.
How Can I fixed this or How can I automatically restart when app get this issue?
org.springframework.jdbc.cannotgetjdbcconnectionexception: DatasourceHealthIndicator Failed to obtain JDBC connection ; nested exception in a java.sql.SQLTransientConnectionException: HikariPool-1 DatasourceHealthIndicator doHealthCheck()
Application properties file contain below
spring.datasource.hikari.max-pool-size = 10 spring.datasource.hikari.minimum-idle = 5
Solution 1:[1]
Bellow configuration worked for me . Thanks everyone for your help.
spring.datasource.hikari.connection-timeout = 600000
spring.datasource.hikari.maximum-pool-size = 15
spring.datasource.hikari.max-lifetime=1800000
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ganesh Java |
