Open maxime-dupuis opened 1 month ago
hi @maxime-dupuis sorry for the delay. Looks like we need to improve our docs a little bit. We have these extra options available in Worker class https://api.docs.bullmq.io/interfaces/v5.WorkerOptions.html#lockDuration and https://api.docs.bullmq.io/interfaces/v5.WorkerOptions.html#lockRenewTime that you can increase. You can make some tries to check which values work for your use cases.
lockDuration
Thanks, I think it might be useful sometimes if the expected duration is known.
In our case, the "yielding" trick works best for us because
Is your feature request related to a problem? Please describe.
My CPU intensive jobs would do "correct" work, but they stall with errors:
Describe the solution you'd like
I'd like a way to tell BullMQ that my job is still working correctly. So that my job is not considered stalled.
AND/OR the snippet below (or a better fix) should be in the documentation about stalled jobs so people know how to prevent the stalls
Describe alternatives you've considered
Adding this in the CPU intensive loop solves my problem