Redis Cleanup and Memory Management in Kubernetes
A production-tested guide to keeping Redis healthy in Kubernetes: memory control, safe cleanup patterns, Sidekiq pitfalls, backups, and troubleshooting.
A production-tested guide to keeping Redis healthy in Kubernetes: memory control, safe cleanup patterns, Sidekiq pitfalls, backups, and troubleshooting.
A Rails test suite hung intermittently until transactional tests, ActiveJob, and ActiveStorage turned out to be racing over the same locked rows.
How optimistic concurrency, unique job locks, and throttling stop out-of-order background job updates in both Rails/Sidekiq and Laravel queues.
Comparing rufus-scheduler's in-process polling loop with sidekiq-scheduler's Redis-backed queue to pick the right one for single-process vs distributed apps.
Console-ready Ruby snippets to inspect Sidekiq queues, scheduled jobs, retry and dead sets, and currently running workers when the dashboard is not enough.
How I traced a Redis memory jump from 130MB to 800MB back to an unthrottled Sidekiq integration, and the maxmemory, eviction, and unique-job fixes that followed.
Redis serves two very different roles in a Rails app, a disposable read cache and a durable job queue, and conflating the two causes real outages.
A missed notification email traced back to the Linux OOM killer terminating a Sidekiq job mid-run, leaving a stuck Redis lock and no error logged anywhere.