From 9f7bbb45f0ed5724af2b670bb33da2d69160e943 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 21 Mar 2024 08:54:23 +0100 Subject: [PATCH] timeout closing db pool --- backend/src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/main.rs b/backend/src/main.rs index f36108cca2..5f4ca64478 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -566,8 +566,10 @@ Windmill Community Edition {GIT_VERSION} _ = db.close() => { tracing::info!("Database connection pool closed"); }, + _ = tokio::time::sleep(Duration::from_secs(15)) => { + tracing::warn!("Could not close database connection pool in time (15s). Exiting anyway."); + } } - db.close().await; Ok(()) }