Skip to content
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

Causes duplicate jobs to be created on restart #152

Open
adambutler opened this issue Aug 5, 2023 · 1 comment
Open

Causes duplicate jobs to be created on restart #152

adambutler opened this issue Aug 5, 2023 · 1 comment

Comments

@adambutler
Copy link

We were using version 1.0.0.alpha.1 with Sidekiq 5.5.9 when we noticed a strange issue where we would get many copies of jobs in our retry queue.

We upgraded sidekiq to 7.1.2 but the issue persisted and could be reliably replicated until we removed sidekiq-throttled.

Steps to replicate:

  1. Queue a job that will raise in our case this job was not using sidekiq-throttled
  2. Allow it to go into the retry queue
  3. Restart the sidekiq process
  4. Many copies of the job get created

Whilst investigating we removed this dependency and the issue stopped presenting itself.

@ixti
Copy link
Owner

ixti commented Nov 20, 2023

Can you please test with >= v.1.0.0?
If you can provide a snippet that I can use to replicate that will help significantly. So far I've tried this one:

require "bundler/setup"

require "sidekiq"
require "sidekiq/throttled"

Sidekiq::Throttled.setup!

class SampleJob
  include Sidekiq::Job
  include Sidekiq::Throttled::Job

  sidekiq_throttle concurrency: { limit: 3 }

  def perform
    raise "oops"
  end
end

SampleJob.perform_async if ENV["ENQUEUE"]

Sidekiq is 7.2 and sidekiq-throttled tried both alpha and release versions:

  1. run with ENQUEUE=1 bundle exec sidekiq -r ./demo.rb
  2. kill the proceess with Ctrl+C
  3. run bundle exec sidekiq -r ./demo.rb
  4. retry set contains only one job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants