You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a job that can run for an extended period — let’s call it InfiniteSleepJob:
classInfiniteSleepJob < ApplicationJob# limit only one simultaneous execution of operation per keylimits_concurrencyto: 1,key: ->(key, *_args){key},group: "my_group",duration: 1.daydefperform(*args)# do smtendend
When I add a few jobs to the queue and the worker unexpectedly dies during execution (e.g., due to an HA event or if I forcibly kill the Docker container with docker kill container), the concurrency limit gets stuck, even after the job is pruned. Block is released only when it expires
Here’s an example of a job that was pruned, but the concurrency limit wasn’t removed:
Hey @OlegChuev, yeah, it's expected behaviour if the worker dies unceremoniously (eg. a kill -9 signal). It wouldn't have a chance to clean up after itself, which includes the concurrency limit. The duration parameter determines how long the system will wait to unblock jobs that didn't get successfully unblocked for any reason, so if your long running job starts at, say 17:00, another one gets enqueued and blocked at 18:00, and the first one dies at 20:00, it won't be until the following day at 17:00 (1.day duration) that the blocked job will be considered to be unlocked.
I have a job that can run for an extended period — let’s call it
InfiniteSleepJob
:When I add a few jobs to the queue and the worker unexpectedly dies during execution (e.g., due to an HA event or if I forcibly kill the Docker container with
docker kill container
), the concurrency limit gets stuck, even after the job is pruned. Block is released only when it expiresHere’s an example of a job that was pruned, but the concurrency limit wasn’t removed:

Here’s my
queue.yml
:I’d expect the queue to unlock as soon as the job fails, allowing the blocked jobs to proceed as expected.
Could you kindly clarify whether this is the expected behavior? Am I missing something?
The text was updated successfully, but these errors were encountered: