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
Pending batches expiring in 5 months, not 30 days #6277
Comments
30 days is the default. The only way I know to change this value is to monkeypatch the Sidekiq::Batch::EXPIRY constant. |
Yup, thanks @raybaxter ours looks just like that as well. |
This will happen if a batch job dies. Sidekiq Pro extends the batch's expiry to the dead job lifetime so the batch will not expire before any dead batch jobs have been garbage collected. See |
Ahh, this makes sense! Maybe updating the Wiki will clear this up. 👍 |
If you have clear criteria for deleting batches, you can delete them from the Rails console: Sidekiq::BatchSet.new.select {|b| b.description.match /^Full Title/ }.map(&:delete)
Sidekiq::BatchSet.new.select {|b| b.failures > 1 }.map(&:delete)
Sidekiq::BatchSet.new.detect {|b| b.bid == "S9yJ0GD2CW1TGw"}.delete |
Ruby version: 3.0.6p216
Rails version: 6.1.7.7
Sidekiq / Pro / Enterprise version(s): 7.2.0 / 7.2.0 / 7.2.0
Hello! The wiki says that "Pending batches will expire in Redis after 30 days" but we are seeing batches created 1 week ago showing in the admin UI has expiring in 5 months. These batches are pending because they included dead jobs that due to miscommunication with other teams, resulted in the dead jobs being deleted rather than retried. I'm confused by where the 5 months might be coming from.
My goal is to clear out these pending batches that we know will not succeed, so that we can get the admin UI back to being useful for looking at newer batches that may be stuck for different reasons.
The text was updated successfully, but these errors were encountered: