Repository navigation
fix: apply Hikari pool sizing and lifetime settings [2.42] - #25543
Merged
Merged
Conversation
The Hikari pool was built before its sizing was set, so minimumIdle was fixed at 10 and connection.pool.min_idle/max_idle_time/max_lifetime_seconds were ignored. Integration tests set min_idle=3, but every cached Spring test context still kept 10 connections, exhausting the Postgres test container (max_connections=100) and failing context loads with "too many clients" (e.g. CacheInvalidationMessagePublisherTest). Configure HikariConfig before constructing the data source and add the connection.pool.min_idle, keep_alive_time_seconds and max_lifetime_seconds keys as on 2.43 (#21261, #23015). Defaults match the previous effective Hikari values; max_idle_time is only applied to Hikari when set explicitly because its 7200s default is sized for c3p0.
|
jbee
approved these changes
Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Hikari ignored
connection.pool.min_idle,max_idle_timeandmax_lifetime_secondsbecause the pool was started before its sizing was set (minIdle stuck at 10). Every cached integration test context held 10 connections and the Postgres test container ran out (FATAL: sorry, too many clients already), failingCacheInvalidationMessagePublisherTestat context load in Jenkins 2.42 #2394 and #2395.HikariConfigbefore constructing the data source, addconnection.pool.min_idle,keep_alive_time_seconds,max_lifetime_seconds.max_idle_timeis only applied to Hikari when set explicitly, since its 7200s default is sized for c3p0 and exceeds Hikari's max lifetime.Local:
dhis-test-integrationpeaks at 43 DB connections instead of ~100; 3137 tests green.AI Assisted