One JID ended up as ~1,400 retry entries: the same retry payload ran many times, each with a new enqueued_at
Summary
A job that fails on every run (a data bug on our side) was pushed once, but ended up as about 1,400 entries with the same JID in the retry set. The extra executions overloaded our database. We'd like help understanding what could push the same retry payload back into a queue again and again.
This job fails every day with the same error, and normally it behaves as expected: it runs once per retry, no more than its retry count allows. The duplication happened on only one day, Sep 25.
Environment
- Two Rails apps share one Sidekiq Redis and both run Sidekiq processes:
- App that runs the job: Ruby 3.3.5, Rails 8.0.5.1, redis-client / hiredis-client 0.21.0
- Main app (also hosts the Web UI): Ruby 3.2.3, Rails 8.0.4.1, redis-client / hiredis-client 0.24.0
- sidekiq 7.2.4, sidekiq-pro 7.2.0 (
super_fetch!,reliable_push!) - Sidekiq Redis config:
reconnect_attempts: 10, default timeouts - Default retries (25), no
sidekiq_retry_in - Also installed: sidekiq-unique-jobs 8.0.10 (
lock: :until_executed), sidekiq-failures 1.0.4
What happened
- On Sep 25, the job was pushed once at 08:30:22 UTC and raised
TypeErroron every run. - In a 77-minute log window (10:50–12:08 UTC), the same JID ran 1,666 times, all at
retry_count6–8. - Those runs contain only 824 distinct (retry_count, retried_at) pairs. About 90 payloads ran 8 to 13 times each, every time with a new
enqueued_at. - The repeats arrived in bursts at specific seconds: 10:50:48, 12:00:41, 12:01:13, 12:01:27, 12:03:07, 12:03:14, 12:03:30 and 12:04:43 UTC.
- By 12:08 there were about 1,400 retry entries for this JID.
Example (trimmed log lines)
The first line is the scheduled retry. The second is the same payload running again 76 seconds later:
2026-09-25T11:59:30.590Z WARN: {"context":"Job raised exception","job":{... "jid":"22e79b7d65e9a7a57f88008b","enqueued_at":1790337570.4698532,"error_class":"TypeError","retry_count":8,"retried_at":1790333459.2065203 ...}}
2026-09-25T12:00:46.461Z WARN: {"context":"Job raised exception","job":{... "jid":"22e79b7d65e9a7a57f88008b","enqueued_at":1790337643.5584114,"error_class":"TypeError","retry_count":8,"retried_at":1790333459.2065203 ...}}That payload ran nine more times by 12:04:43, each time with a different enqueued_at. No two repeats share an enqueued_at, so they don't look like the same bytes being re-delivered.
Questions
- What could make the same retry payload (same JID,
retry_countandretried_at) run several more times, each with a newenqueued_at? - Does Sidekiq prevent two jobs with the same JID from existing at the same time? If not, what's the recommended way to guard against it?
- How can we trace where these extra pushes came from, for example which process or code path pushed them?
Happy to share more logs or config.
Source: sidekiq/sidekiq