Database connection pool exhausted (HikariCP: Connection is not available)
- Platforms
- Paper · Purpur · Velocity · single server
- Verified
- Verified
- Confidence
- Confidence 85%
What it looks like in the log
Any one of these lines is enough. The agent matches them locally, on your server.
logs/latest.log
[WARN] Connection is not available, request timed out after
Symptoms
- A plugin cannot get a connection from the pool within the allotted time
- Commands/logins that depend on the database (permissions, economy) are slow or fail
Cause
The plugin did not get a connection from the HikariCP pool: the database is unreachable, the pool is too small for the load, or connections are leaking/stuck on slow queries.
Possible causes
- The database server is unreachable or refusing connections (see Caused by: Connection refused / Socket fail to connect)
- The pool size (maximum-pool-size) is smaller than the concurrent load, or the database's max_connections is exhausted
- Connection leak or long-running queries in the plugin
How to fixLow risk
- Look at the
Caused by:line in the evidence:Connection refused/Socket fail to connect— the database is unreachable (check the database service, and the host and port in the plugin config). - If the database is reachable, check the plugin's
maximum-pool-sizeand the database'smax_connections(the sum of the pools across all servers in the network must not exceed the limit). - If the error keeps recurring with a healthy database, update the plugin and enable
leak-detection-thresholdto track down the leak.
Translated from the Russian original; log lines are quoted verbatim.