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.