ixti/sidekiq-throttled

Issue with concurrency - Sometimes gets stuck on 1 concurrent worker

Closed this issue · 2 comments

Hi there, sometimes the concurrency feature doesnt work properly with dynamic throttling and gets stuck on a single worker working the queue:

Example below:
image

Not sure how to debug why this is happening. I have placed my worker configuration below:
(Ideally, we want to limit to 100 concurrent workers per url's host).

class ScrapeWorker
  include Sidekiq::Worker
  include Sidekiq::Throttled::Worker

  sidekiq_throttle(
      { concurrency:
            { limit: 100,
              key_suffix: -> (url ) {
                URI(url).host }
            }
      })
  sidekiq_options queue: :scrape, backtrace: true

  def perform(url)
  end
end

Any ideas what we are doing wrong or whether there's a bug in the gem?

Any updates on this?

ixti commented

This issue was resolved with concurrency strategy refactoring. The problem was with lock starvation. Please upgrade to 0.8.0 or later