ixti/sidekiq-throttled

Throttling not clearing - sidekiq_throttle_as not working properly

Blokh opened this issue · 2 comments

Blokh commented

Greetings,
sidekiq_throttle_as is not working properly as the jobs that are finishing are not clearing the keys.
The concurrency key is always stuck at max ( 20 )

redis.zrange('throttled:feed_listing_worker_concurrency_strategy:concurrency.v2', 0, -1).count => 20
although there are currently 9 running jobs.
I've generated a worker to clear up the not running jids.
but the issue is that it isn't optimized and not working 100%.

Are there any suggestion of what am I doing wrong?

In 0_sidekiq:
Sidekiq::Throttled::Registry.add(:feed_listing_worker_concurrency_strategy, concurrency: { limit: 20 }) # limit all the feed listing workers concurrency combined
In the worker:

  include Sidekiq::Throttled::Worker
  sidekiq_throttle_as :feed_listing_worker_concurrency_strategy

Gems versions:
sidekiq-throttled (0.15.0)
sidekiq-pro (5.0.0)
sidekiq (5.2.8)

ixti commented

Can you check against v1.0.0.alpha?
I have plans on refactoring the internals of throttling (planning on switching gears to redis-throttle) completely, but before that would like to iron out all the sidekiq integration bugs first.

ixti commented

I'm closing this for now - feeel free to reopen.