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

Bull error (stalled jobs) #43

Open
hardcodet opened this issue Mar 20, 2023 · 1 comment
Open

Bull error (stalled jobs) #43

hardcodet opened this issue Mar 20, 2023 · 1 comment

Comments

@hardcodet
Copy link

Hi there

Version: 5.1.14

Noticed the following Bull error on our cluster that occurred during application startup.

Error: job stalled more than allowable limit
    at /app/node_modules/bullmq/dist/cjs/classes/worker.js:517:62
    at Array.forEach (<anonymous>)
    at WorkerPro.notifyFailedJobs (/app/node_modules/bullmq/dist/cjs/classes/worker.js:517:20)
    at WorkerPro.moveStalledJobsToWait (/app/node_modules/bullmq/dist/cjs/classes/worker.js:510:22)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async WorkerPro.checkConnectionError (/app/node_modules/bullmq/dist/cjs/classes/queue-base.js:118:20)
    at async WorkerPro.runStalledJobsCheck (/app/node_modules/bullmq/dist/cjs/classes/worker.js:494:17)
    ```
    
Looking at my logs for the last 30 days, I saw a burst of those on one single day, not sure what to make of that:

![image](https://user-images.githubusercontent.com/873009/226401815-c3bd2486-0669-4443-a584-c5bca3940680.png)

Any idea on how to triangulate this?
@manast
Copy link
Contributor

manast commented Mar 22, 2023

These are jobs that have stalled more than the max stalled count setting (1 by default https://api.docs.bullmq.io/interfaces/WorkerOptions.html#maxStalledCount). In your case I suspect that you server was restarted several times in a small time span so that some jobs stalled more than once. If this is something expected to happen often you can increase the max stalled count, you should also consider graceful shutdowns to minimize this problem: https://docs.bullmq.io/guide/going-to-production#gracefully-shut-down-workers

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

2 participants