-
Notifications
You must be signed in to change notification settings - Fork 0
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
Minimum retry time seems to be 5 seconds #62
Comments
5 seconds seems like a suspicious value, as it is the standard blocking timeout, maybe we are not properly calculating the block timeout based on the backoff value, @roggervalf what do you think? |
hi @kibertoad, I cannot replicate your case, it'll be good if you can provide a test case to replicate it |
btw I'm adding one extra test case using exponential backoff and it's not taking more than 2 seconds taskforcesh/bullmq#2266 |
@roggervalf sure, I'll try to create a repro tonight. |
Sorry for the delay. I can still reproduce the issue with the latest bullmq. Working on a repro now. |
OK, so it previously went away for us after we set the following for our code: if (this.config.isTest && typeof preparedOptions.backoff === 'object') {
preparedOptions.backoff.delay = 0
} However, I'll try to create a repro again this time, it should be easier to reproduce. |
@manast Actually, this seems to be a regression from the past: taskforcesh/bullmq#1505 We are seeing the same behaviour with BullMQ 5.4.2/BullMQ Pro 7.0.0 This is for a non-recurring job with concurrency > 1, attempts = 3 and backoff.delay = 0 |
Retry timeout parameter doesn't seem to matter unless it's more than 5 seconds.
If I set my backoff strategy to exponential/1, my test (which does retry once) finishes in 5 seconds 220 msecs.
If I set my backoff strategy to exponential/1000, it finishes within approximately same time.
Same for exponential/4000
But if I set it to exponential/6000, it finishes in 6 seconds 220 msecs, and execution time keeps growing accordingly if I increase it even further.
I can understand why this makes sense for production, but for tests burning 5 seconds for each test that does a retry is unacceptable. Would it be possible to support setting very low retry delays?
Reproduction
Any simple job that throws on execution will do, it is not related to logic being executed. Logs indicate that Bullmq doesn't even attempt to retry the failed job until 5 seconds pass, e. g.:
Versions:
The text was updated successfully, but these errors were encountered: