Skip to content

Abort Ruby Reaper when sidekiq queues are full#690

Merged
mhenrixon merged 6 commits intomhenrixon:mainfrom
francesmcmullin:perf/670-skip-reaping-if-queues-full
Apr 2, 2022
Merged

Abort Ruby Reaper when sidekiq queues are full#690
mhenrixon merged 6 commits intomhenrixon:mainfrom
francesmcmullin:perf/670-skip-reaping-if-queues-full

Conversation

@francesmcmullin
Copy link
Copy Markdown
Contributor

This is an attempt to resolve #670 .

This change is quite blunt - it silently returns from the ruby reaper if queues are longer than an arbitrary number (1,000 jobs). I'm conscious this may not be ideal for all use cases, but there are a lot of settings already. In my experience, the performance of the reaper degrades so much in these circumstances, it's not worth running, and it will occupy resources you could be using to clear that queue!

If there's anything I missed or further changes from a stylistic or architectural perspective that might help, just let me know and I'll be happy to work on this some more.

@francesmcmullin francesmcmullin force-pushed the perf/670-skip-reaping-if-queues-full branch from ba5acc9 to 8b49160 Compare March 13, 2022 18:56
@francesmcmullin francesmcmullin force-pushed the perf/670-skip-reaping-if-queues-full branch from 3f43a10 to 963ac07 Compare March 23, 2022 15:46
Comment thread lib/sidekiq_unique_jobs/orphans/ruby_reaper.rb
@mhenrixon mhenrixon merged commit e2b7f15 into mhenrixon:main Apr 2, 2022
@francesmcmullin francesmcmullin deleted the perf/670-skip-reaping-if-queues-full branch June 30, 2022 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skip reaping when queues are too large

2 participants