Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promise rejection error in waitForJob #623

Closed
stephenlacy opened this issue Jul 1, 2021 · 3 comments · Fixed by #749
Closed

Promise rejection error in waitForJob #623

stephenlacy opened this issue Jul 1, 2021 · 3 comments · Fixed by #749
Labels

Comments

@stephenlacy
Copy link

We are running redis on AWS in cluster mode, which is returning this redis error when it swaps master/replica:

UNBLOCKED force unblock from blocking operation, instance state changed (master -> replica?)

That is then causing an error to throw in our bullmq services, full error:

ReplyError: UNBLOCKED force unblock from blocking operation, instance state changed (master -> replica?)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
    at parseError (/code/node_modules/redis-parser/lib/parser.js:179:12)
    at parseType (/code/node_modules/redis-parser/lib/parser.js:302:14) {
  command: {
    name: 'brpoplpush',
    args: [
      'bull:task:jobs:wait',
      'bull:task:jobs:active',
      '5'
    ]
  }
}

It seems that this try/finally is missing a catch causing this error to bubble up, would that be correct?

jobId = await client.brpoplpush(

@manast
Copy link
Contributor

manast commented Jul 15, 2021

The fix you made may help but we should definitely report the error to the user, and also check what happens when the error is ignored so that we for example do not end in some "infinite loop" of errors and trying again the fetch the next job, etc.

@manast
Copy link
Contributor

manast commented Jul 15, 2021

So probably if the error is just "emitted" we should wait a delay of a couple of seconds before returning to avoid said infinite loops.

@github-actions
Copy link

🎉 This issue has been resolved in version 1.46.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants