mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-09-10 10:45:57 +03:00
Make database connection pool dynamic (#6166)
* Add min_idle and idle_timeout to database pool * Update src/config.rs Co-authored-by: Daniel García <dani-garcia@users.noreply.github.com> --------- Co-authored-by: Daniel García <dani-garcia@users.noreply.github.com>
This commit is contained in:
@@ -639,9 +639,15 @@ make_config! {
|
||||
/// Timeout when acquiring database connection
|
||||
database_timeout: u64, false, def, 30;
|
||||
|
||||
/// Database connection pool size
|
||||
/// Timeout in seconds before idle connections to the database are closed
|
||||
database_idle_timeout: u64, false, def, 600;
|
||||
|
||||
/// Database connection max pool size
|
||||
database_max_conns: u32, false, def, 10;
|
||||
|
||||
/// Database connection min pool size
|
||||
database_min_conns: u32, false, def, 2;
|
||||
|
||||
/// Database connection init |> SQL statements to run when creating a new database connection, mainly useful for connection-scoped pragmas. If empty, a database-specific default is used.
|
||||
database_conn_init: String, false, def, String::new();
|
||||
|
||||
|
Reference in New Issue
Block a user