nits clamp min connections

This commit is contained in:
Ruben Fiszel
2025-02-09 12:02:25 +01:00
parent 61fad02dd1
commit 3a68892a2b
+1 -1
View File
@@ -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(