Connection Pool Articles
2 articles about Connection Pool. Explore Spring Boot implementation, design, and operations across related topics.
-
Causes and Fixes for HikariCP "Failed to validate connection" and "Connection is closed" in Spring Boot - How to Decide maxLifetime and keepaliveTime
Learn how to isolate HikariCP "Failed to validate connection" and "Connection is closed" errors by pool stage, how to derive maxLifetime and keepaliveTime from DB and network timeouts, and how to diagnose why the pool does not recover after a DB restart.
-
How to Correctly Configure and Tune the HikariCP Connection Pool in Spring Boot - Why the Default of 10 Isn't Enough
A tuning walkthrough for eliminating "Connection is not available" errors with HikariCP in Spring Boot. Covers the default maximumPoolSize of 10 and the official sizing formula (cores × 2 + 1), reducing connectionTimeout from 30s to 3s, the relationship between maxLifetime and wait_timeout, and leak detection with leakDetectionThreshold, all with implementation examples. Includes comparison data showing the timeout error rate dropping from 40% to 3% after revisiting the configuration.