HikariCP timeout ☕ Java

HikariPool-1 - Connection is not available, request timed out after 30000ms

The connection pool was exhausted — all connections were busy for 30 seconds.

Seen on: Java

Meaning

Long transactions, slow queries, connection leaks (not closed) or a pool too small for the concurrency cause requests to wait and time out.

Common causes

  • Connection leaks (connections not returned)
  • Slow queries holding connections
  • Pool too small for load
  • Long @Transactional methods doing network calls

⚡ Quick fix

  1. Enable leak detection (leakDetectionThreshold)
  2. Fix slow queries
  3. Keep transactions short
  4. Size the pool for your DB’s capacity

Detailed fix by platform

Java

  1. spring.datasource.hikari.leak-detection-threshold=20000

How to diagnose

  1. Pool — Active vs max connections
  2. Holders — Which code holds connections longest?

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.