Skip to content

fix: BullMQ fails on Dragonfly without --default_lua_flags=allow-undeclared-keys #273

Closed

Description

@sasagar

Problem

With Dragonfly's default settings, BullMQ Lua scripts fail when processing jobs:

ERR Error running script (call to ...): @user_script:498: -ERR script tried accessing undeclared key, key: bull:smoke:2

Reproduced locally with Dragonfly latest using the same flags as docker/compose.yml (--maxmemory --proactor_threads --cache_mode) and prefix: "bull", with both bullmq 5.81.5 / ioredis 5.11.1 and bullmq 6 / ioredis 6. So this predates the dependency upgrade in #272.

Adding --default_lua_flags=allow-undeclared-keys (Dragonfly's documented setting for BullMQ) fixes it: enqueue → process → complete works.

Affected configs

  • docker/compose.yml, docker/compose.dev.yml, .devcontainer/compose.yml
  • deploy/k8s/rox/20-dragonfly.yaml (production, dragonfly:v1.25.1) — needs checking whether the production delivery queue is actually affected (backend logs / stuck bull:* keys)

Fix

Add --default_lua_flags=allow-undeclared-keys to all Dragonfly configs.

Activity

  1. sasagar commented on Oct 13, 2026

    @sasagar
    MemberAuthor

    Additional finding: production does not use Dragonfly at all

    Production has no bull:* keys and backend logs show no Lua errors. Root cause:

    • DragonflyCacheAdapter.ts and ActivityDeliveryQueue.ts read only REDIS_URL
    • docker/compose.yml and deploy/k8s/rox/secret.example.yaml set DRAGONFLY_URL
    • → connection to localhost:6379 fails → caching disabled and synchronous delivery fallback, logged only at debug level

    Fixed in #274: accept DRAGONFLY_URL as a fallback and log connection failures at warn.

    Once deployed, the queue will actually start using Dragonfly, so the Lua flag from this issue must be applied to the cluster first.

  2. github-actions commented on Oct 13, 2026

    @github-actions

    Closed by #274 (merged to dev).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions