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
Missing lock for job error #1497
Comments
This usually happens if for example a job has been stalled (the worker did not manage to update the lock on the job in time, which is 30 seconds by default), so some other worker took the job. Eventually the worker that lost the lock try to complete the job and since it does not own the lock anymore it will give the above error. |
Thanks, that's helpful! What is your recommended course of action? Ensure that the worker can update the lock in time? Increase the lock time (if that's possible?) to give jobs more time to complete? |
If this happens often then it could be that the job is very CPU intensive so the lock cannot be renewed in time. In that case, the best would be to either break the job into smaller steps or try using sandboxed processors on a multi-core CPU, so that the process that renews the lock is running in its own core and the job in the others. |
Thanks! |
I've looked through the various other issues that specifically mention the "Missing lock for job" error, but all of them seem to use flows, which I'm not.
I've seen the error for single jobs:
As well as repeat jobs:
Any idea what's going on? This is using BullMQ v2.1.1 with ElastiCache Redis, if that makes a difference.
Thanks for your help!
The text was updated successfully, but these errors were encountered: