diff --git a/src/main_module/bootstrap.rs b/src/main_module/bootstrap.rs index 826ba7e1..5f00fefc 100644 --- a/src/main_module/bootstrap.rs +++ b/src/main_module/bootstrap.rs @@ -296,8 +296,9 @@ pub async fn init_redis() -> Option> { let result = tokio::task::spawn_blocking(move || { match redis::Client::open(cache_url_clone.as_str()) { Ok(client) => { - // Verify the connection actually works - match client.get_connection() { + // Verify the connection actually works with a strict timeout to avoid hanging on DROP rules + let timeout = std::time::Duration::from_secs(3); + match client.get_connection_with_timeout(timeout) { Ok(mut conn) => { // Test with PING match redis::cmd("PING").query::(&mut conn) {