mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-05 08:02:18 +00:00
nits clamp min connections
This commit is contained in:
@@ -273,7 +273,7 @@ pub async fn connect(
|
||||
use std::time::Duration;
|
||||
|
||||
sqlx::postgres::PgPoolOptions::new()
|
||||
.min_connections(max_connections)
|
||||
.min_connections((max_connections / 5).clamp(3, max_connections))
|
||||
.max_connections(max_connections)
|
||||
.max_lifetime(Duration::from_secs(30 * 60)) // 30 mins
|
||||
.connect_with(
|
||||
|
||||
Reference in New Issue
Block a user