fix: set min_connections(0) to prevent sqlx pool spin loop (#8334)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-03-11 23:46:24 +00:00
committed by GitHub
parent cbc7e78f8a
commit bf4340f40c
+1 -1
View File
@@ -98,7 +98,7 @@ pub async fn connect(
use sqlx::Executor;
use std::time::Duration;
let mut pool_options = sqlx::postgres::PgPoolOptions::new()
.min_connections((max_connections / 5).clamp(1, max_connections))
.min_connections(0)
.max_connections(max_connections)
.max_lifetime(Duration::from_secs(30 * 60)); // 30 mins
if worker_mode {