/cluster-bull

Minimum repro for bugs caused by combining NodeJS cluster with BullMQ

Primary LanguageTypeScript

cluster-bull

Minimal setup to reproduce bugs caused by combining NodeJS cluster with BullMQ queues. See taskforcesh/bullmq#1507 for more info.

  1. Make sure Redis is running on localhost:6379
  2. npm i && npm run start:dev
  3. Open http://localhost:5005/dashboard to view queue jobs

Screenshots of issues

  • Jobs intermittently get the "missing lock for job" error missing lock for job missing lock for job dashboard

  • Every job on bull-board shows attempt #2 (reflecting job.attemptsMade) (this actually shows up with cluster disabled as well - might be a bug with bull-board) attempt_2

Without cluster

You can verify that changing CLUSTER_ENABLED to false at the top of index.ts will resolve the first issue ("missing lock for job").