HikariDataSource (HikariPool-1) has been closed.

3,530 views
Skip to first unread message

Darek Danielewski

unread,
Dec 12, 2021, 9:27:18 AM12/12/21
to HikariCP
Quite often, every day actually, we get several of these error messages in our logs.

Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: HikariDataSource HikariDataSource (HikariPool-1) has been closed.

Could someone recommend what setting I should be looking at to improve stability? I sense it is a relation between JDBC timeout, DB session disconnect timeout, and HikariCP timeout settings. Any help is appreciated.

ryan....@gmail.com

unread,
Dec 12, 2021, 3:07:04 PM12/12/21
to HikariCP
What is managing your Hikari pool? You should only see this exception if the pool itself were closed, see here. Are you expecting the pool to be long lived i.e. the scope of your application (typical) or are you doing some more dynamic management of the pool that involves teardown at runtime? You should also be able to see the logging when the pool closes here to narrow down what is closing the pool.

Darek Danielewski

unread,
Dec 13, 2021, 8:40:11 AM12/13/21
to HikariCP
There is no special pool management, and the lib is running with mostly defaults inside a Spring Boot application. 

Darek Danielewski

unread,
Dec 13, 2021, 10:51:05 AM12/13/21
to HikariCP
And yes ... we do see "Shutdown initiated" in our logs. Although, can't say that's deliberate. Some event on Spring Boot side is causing this. Will have to investigate, unless you already have some tips.
Reply all
Reply to author
Forward
0 new messages