Spring Opens new Hikari Pool eventhough old one already exist

Viewed 278

I use hikaridatasource(3.4.5) and spring boot(2.4) and spring jpa to access database

When I checked my database session I see too much connection on my database.I set my max and min pool size and my expectation is there is no more connection than my maximum pool size

maximumPoolSize=5
minimumIde=3

When I check my spring logs I see to many Hikari pool,Somehow if exist pool is useless,then why I see connections? Can spring boot open hikari pool and cant destroy old one?Why new pool created?

When I check hikari code,As I understand HikariPool-n means n pool name

LOGGER.info("{}-Starting...",configuration.getPoolName());

com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.

com.zaxxer.hikari.HikariDataSource       : HikariPool-1

com.zaxxer.hikari.HikariDataSource       : HikariPool-2

com.zaxxer.hikari.HikariDataSource       : HikariPool-3
0 Answers
Related