mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-09 17:23:04 +03:00
[PR #6166] Make database connection pool dynamic #2455
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/dani-garcia/vaultwarden/pull/6166
State: closed
Merged: Yes
Hello,
I've notice that Vaultwarden always keep his database pool fully connected to the database. Since my instance of Vaultwarden has a light load this resulted in 10 database connections being almost always in idle.
This PR fix this by using
min_idleandidle_timeoutoptions of the database pool manager. This allow the app to keep only 2 sessions at minimum while allowing the pool to grow when there is more load.