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

Error: Missing lock for job 84 failed #489

Closed
ujwaldhakal opened this issue Apr 22, 2021 · 7 comments
Closed

Error: Missing lock for job 84 failed #489

ujwaldhakal opened this issue Apr 22, 2021 · 7 comments

Comments

@ujwaldhakal
Copy link

Hello i am using 2 node process one main and one for queue in supervisor with docker where i have set autorestart and start to true. When some job takes longer time I get . I was little confused on where to start and if anyone has similar issue that would be great.

A 2021-04-21T23:36:04.598667Z Error: Missing lock for job 84 failed
at Function.finishedErrors (/var/www/node_modules/bullmq/dist/classes/scripts.js:135:24)
at Job.moveToFailed (/var/www/node_modules/bullmq/dist/classes/job.js:207:41)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async handleFailed (/var/www/node_modules/bullmq/dist/classes/worker.js:220:17)
at async Worker.run (/var/www/node_modules/bullmq/dist/classes/worker.js:99:34)
A 2021-04-21T23:37:54.192317Z Error: Missing lock for job 85 failed
at Function.finishedErrors (/var/www/node_modules/bullmq/dist/classes/scripts.js:135:24)
at Job.moveToFailed (/var/www/node_modules/bullmq/dist/classes/job.js:207:41)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async handleFailed (/var/www/node_modules/bullmq/dist/classes/worker.js:220:17)
at async Worker.run (/var/www/node_modules/bullmq/dist/classes/worker.js:99:34)

@manast
Copy link
Contributor

manast commented Apr 22, 2021

Probably due to this: https://docs.bullmq.io/guide/jobs/stalled

@ujwaldhakal
Copy link
Author

@manast but there is no stalled flag in my current queue job .. yep my some of the background task take long time and they are processed even though i get this issue. And once i get this error the job will be still there and no one will proceed i am running sandbox processor that is running function in different file

@manast
Copy link
Contributor

manast commented Apr 22, 2021

You should provide a minimal test case that reproduces the issue so we can help better.

@ujwaldhakal
Copy link
Author

Ok sure i will provide with some codes that will replicate.Thank you !

@ujwaldhakal
Copy link
Author

OptimalBits/bull#1591

I got it fixed by increasing the lockDuration from 30 sec to the 5 mins max and it is working great

@manast manast closed this as completed May 9, 2021
@edisoncpp
Copy link

I'm getting this error after 30 minutes even if I set the lockDuration to 90 minutes, AND the worker has async requests and database calls in it freeing up the event loop.

@hgeldenhuys
Copy link

hgeldenhuys commented Jul 5, 2023

I suspect that when bull does the stalled check, Redis might not be available for a moment due to swapping out something, the timestamp is then null, which results in a 1970 date, so Bull thinks the job has been stalling for 53+ years.

image

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

No branches or pull requests

4 participants