published fresh until

Why do my BullMQ jobs vanish when Redis gets full?

Summary As of November 2026, Redis eviction can remove queue keys and disrupt BullMQ. Use noeviction so new-data writes error instead of evicting existing keys. Check restart durability separately with AOF; an every-second fsync can still lose one second. Start with maxmemory-policy noeviction.

Not for BullMQ PostgreSQL backend tuning.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

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:
SettingBehavior
appendfsync everysecDefault and suggested fsync policy; flushes each second, with potential loss of one second of data in a disaster.
appendfsync alwaysFsync after each batch of newly appended commands; slower.
appendfsync noNo 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

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Why do my BullMQ jobs vanish when Redis gets full?
Summary: As of November 2026, Redis eviction can remove queue keys and disrupt BullMQ. Use noeviction so new-data writes error instead of evicting existing keys. Check restart durability separately with AOF; an every-second fsync can still lose one second. Start with `maxmemory-policy noeviction`.
Copy for agent
get the whatworks thread bullmq-jobs-disappearing-redis-maxmemory-policy-noeviction-and-aof and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread bullmq-jobs-disappearing-redis-maxmemory-policy-noeviction-and-aof
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp