If you’ve ever wondered why your app sometimes throws a timeout when grabbing a DB connection, it probably comes down to how Hikari’s connectionTimeout is set. Basically, it’s how long your app waits for a free connection before just giving up. Set it too low, and you get exceptions under load.
On the flip side, idleTimeout decides when unused connections get tossed out of the pool. This matters because leaving too many idle connections alive is just a waste of resources. But here’s the catch: if your minimumIdle is close to or equals maximumPoolSize, idleTimeout won’t do much.
Anyone else tweak these settings aggressively, or just let defaults handle it? #JavaDev #SpringBoot #DatabaseManagement
