fix(redis): configure maxmemory and eviction policy to prevent OOM
Some checks failed
Some checks failed
Redis had no maxmemory set, causing the Prometheus alert expression (used/max) to evaluate to +Inf. Set maxmemory to 100mb with allkeys-lru eviction policy, and guard the alert expression against division by zero. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,7 @@ services:
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
restart: always
|
||||
command: redis-server --maxmemory 100mb --maxmemory-policy allkeys-lru
|
||||
ports:
|
||||
- "6380:6379" # Use 6380 to avoid conflict with host Redis
|
||||
mem_limit: 128m
|
||||
|
||||
Reference in New Issue
Block a user