diff --git a/src/Core/Utilities/CustomRedisProcessingStrategy.cs b/src/Core/Utilities/CustomRedisProcessingStrategy.cs index fd7cb75ba7..d3883f701f 100644 --- a/src/Core/Utilities/CustomRedisProcessingStrategy.cs +++ b/src/Core/Utilities/CustomRedisProcessingStrategy.cs @@ -66,9 +66,10 @@ public class CustomRedisProcessingStrategy : RedisProcessingStrategy { return await base.ProcessRequestAsync(requestIdentity, rule, counterKeyBuilder, rateLimitOptions, cancellationToken); } - catch (RedisTimeoutException) + catch (Exception ex) when (ex is RedisTimeoutException || ex is RedisConnectionException) { - // If this is the first timeout we've had, start a new counter and sliding window + _logger.LogWarning(ex, "Redis appears down, skipping rate limiting"); + // If this is the first timeout/connection error we've had, start a new counter and sliding window timeoutCounter ??= new TimeoutCounter() { Count = 0,