Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jobs stuck in "waiting" in bull queue node.js

I had a bunch of jobs in bull queue when one got stuck for 1+ hours (normally takes ~2 minutes to run), but didn't fail. I was unable to remove the job from the active state with the bull arena UI that I use, so I deleted the key of the active job in Redis.

That removed the stuck active job, but now the queue isn't pulling any jobs off of the waiting list.

Any ideas? Any thoughts on how to fix it?

like image 678
steveryan Avatar asked Jan 31 '26 11:01

steveryan


1 Answers

i was having the same problem. and then i realized i didn't add connection option for worker. If connection is not added for worker, you can add it as same as queue.

new Worker(
  QUEUE_NAME,
  async job => {
    // ...
  },
  {
    connection: redisConnection,
  },
)
like image 69
Ahmet Şimşek Avatar answered Feb 02 '26 16:02

Ahmet Şimşek



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!