HikariCP: maxLifetime and idleTimeout with fixed-size pool

I would like to know how the settings maxLifetimeand idleTimeoutbehave in the Hikari pool of fixed size.

Under what circumstances are connections removed from a fixed-size pool? And since the pool is a fixed size, is a new connection created immediately after retirement?

Besides, what happens if the database itself (MySQL in my case) closes the connection after the wait time for the database is reached (in case maxLifetimeat least the database timeout)?

Will the connection be removed from the fixed-size pool, and another will be created immediately?

Thanks!

+4
source share
1 answer

HikariCP , , idleTimeout.

HikariCP 30 . "minimumIdle", ( idleTimeout millis).

maxLifetime , (mysql) wait_timeout, /.

HikariCP . .

+8

Source: https://habr.com/ru/post/1622758/


All Articles