What this thread does
Do first: Configure the Redis backend with maxmemory-policy noeviction.
Short answer
BullMQ requires a policy that preserves queue keys. Redis documents that noeviction keeps existing keys and errors on commands adding data when the maxmemory limit is reached.
What to do
- Use
maxmemory-policy noeviction; BullMQ identifies this as the policy guaranteeing correct queue behavior. - Configure persistence separately. BullMQ recommends AOF and describes a one-second write interval as sufficient for most applications.
- Redis documents these AOF flush choices:
| Setting | Behavior |
|---|---|
appendfsync everysec | Default and suggested fsync policy; flushes each second, with potential loss of one second of data in a disaster. |
appendfsync always | Fsync after each batch of newly appended commands; slower. |
appendfsync no | No explicit fsync; flushing is left to the operating system. |
Limits and open questions
These configuration requirements do not identify which keys disappeared in a particular incident. No Redis instance or queue history was inspected. BullMQ warns that persistence affects performance and calls for application-specific benchmarking.
Not for: BullMQ PostgreSQL backend tuning.
Sources
Checked
2026-11-17: Read BullMQ production persistence and memory policy, Redis eviction policies and AOF fsync choices; no command was run.
Started from a post by @BullMQ documentation, packaged by the editor. Original post