Redis max memory limit and eviction policy (#11836)

# Introduction
Redis [eviction
policy](https://redis.io/docs/latest/operate/rs/databases/memory-performance/eviction-policy/)
and [Key
eviction](https://redis.io/docs/latest/develop/reference/eviction/)
[Bullmq eviction
recommendations](https://docs.bullmq.io/guide/going-to-production#max-memory-policy)


We might need a dedicated bullmq redis instance, as sharing
engine/metadata keys and bull will someday become problematic

close https://github.com/twentyhq/core-team-issues/issues/452

About to open a PR for our internal IaC

Ps: Did not set a `--maxmemory` that could be leading to undetermined
OOOM errors at runtime. Should be user provided or should define a
default value ?
This commit is contained in:
Paul Rastoin
2025-05-02 16:40:56 +02:00
committed by GitHub
parent 48011ac012
commit abc05fafd7
3 changed files with 4 additions and 1 deletions

View File

@ -134,6 +134,7 @@ services:
redis:
image: redis
restart: always
command: ["--maxmemory-policy", "noeviction"]
volumes:
docker-data:

View File

@ -25,9 +25,10 @@ spec:
- name: redis
image: redis/redis-stack-server:latest
imagePullPolicy: Always
args: ["--maxmemory-policy", "noeviction"]
env:
- name: PORT
value: 6379
value: "6379"
ports:
- containerPort: 6379
name: redis

View File

@ -14,6 +14,7 @@ services:
redis:
container_name: twenty-redis
image: redis:latest
command: ["--maxmemory-policy", "noeviction"]
volumes:
- twenty-redis-data:/data:Z