Request for reaper documentation #673
-
Describe the bug Maybe you feel like this is something internal to the implantation, and users of the gem should not be required to understand this to use it? My problem is that sometimes we have jobs that are being blocked from starting (they end up on the retry queue because of our :raise conflict strategy) but there is no job currently running. When we look at the list of locks, it appears like there is a lock. But why? Is it orphaned? Should the reaper be cleaning it up? If I delete the lock... the job starts. I am trying to understand enough of the process so I know if I have a problem with my implementation, or if what I am seeing is expected.
Thanks so much for all the work you do on this gem. Maybe someone who is using this functionality could help fill in some of the documentation? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
It indeed cleans up orphaned locks
Jobs that were completed but for whatever reason the lock wasn't cleaned up.
The most common use case for this is the restart of sidekiq, or killing the sidekiq server process. There are a lot of things that can go wrong in a distributed redis setup and the reaper just makes sure your sidekiq won't choke forever on one of those edge cases.
Correct, they would block jobs from either being run or enqueued (depends on the lock type).
It is on by default and since I added it, I have far fewer complaints about the lock mechanism :)
There would be also a log entry like:
You will reap less jobs but to be honest, the ruby reaper is the only one that makes sense. The lua reaper should most likely be removed. It is a separate process completely (from sidekiq) and should not affect Sidekiq at all. At least not for the worse.
Exactly, the risk is that you run into situations where a lock is kept forever (or until manually cleaned up; which isn't a super straight forward process).
The resurrector was something someone added because their reaper process crashed and therefor they could not start new jobs (they had a bunch of orphaned locks). Some other people reported that the resurrector itself was causing problems so I disabled it by default.
Just means that there is nothing to upgrade. |
Beta Was this translation helpful? Give feedback.
It indeed cleans up orphaned locks
Jobs that were completed but for whatever reason the lock wasn't cleaned up.
The most common use case for this is the restart of sidekiq, or killing the sidekiq server process. There are a lot of things that can go wrong in a distributed redis setup and the reaper ju…