Prompt
unhappy with Sidekiq when jobs get stuck
Latest observation
Oct 24, 2026
OpenAI APIWeb search: off
If Sidekiq jobs are getting “stuck,” the fix usually depends on what stuck means:
-
Jobs are queued but not picked up
- Check that Sidekiq processes are running and connected to Redis.
- Verify queue names match your worker configuration.
- Look for thread starvation or too many busy workers.
-
Jobs start but never finish
- The worker may be blocking on a slow API, DB query, lock, or deadlock.
- Add timeouts around external calls.
- Log start/end timestamps and key checkpoints inside the job.
-
Jobs keep retrying forever
- Sidekiq retries are on by default.
- If a job is failing intermittently, inspect the retry set in the Web UI and the exception trace.
- Consider lowering retries or handling known transient failures more explicitly.
-
Jobs appear “busy” but are actually hung
- Common causes: network calls without timeouts, infinite loops, waiting on file I/O, or holding locks.
- Use
rack-timeout/app-level timeouts, and make sure any HTTP client has sane connect/read timeouts.
-
Concurrency / resource issues
- Too many concurrent jobs can saturate DB connections, Redis, or CPU.
- Tune
concurrencyand DB pool size together. - Make sure each process has enough memory; OOM kills can look like stuck jobs.
-
Visibility / monitoring
- Use Sidekiq Web UI, logs, and metrics.
- Add job IDs to logs so you can trace a specific job end-to-end.
- Consider a dead job policy or alerting on long-running jobs.
If you want, I can help you debug this in a more targeted way. For example:
- “jobs remain in queue”
- “jobs start but hang”
- “jobs retry endlessly”
- “jobs are marked busy forever”
If you share a job example, Sidekiq config, and what you see in the Web UI/logs, I can suggest the likely cause.