Skip to main content
READY SIDEKIQHEAP TRIAGE // AMBER TRIAGE HUD TARGET: PUMA + SIDEKIQ JEMALLOC | REDIS NOEVICTION | INTERCOM EXIT
ChatwootQueues
ChatwootQueues Partner Notice: Outbound /go/ links marked rel="sponsored" may earn a referral fee at zero checkout surcharge (Disclosures).
Remediation Hub (9)

Set Distinct Docker mem_limit Caps for Puma, Sidekiq & Postgres

Bounding rails and sidekiq with explicit cgroup mem_limit ceilings protects PostgreSQL shared_buffers and Redis queues from host-wide OOM freezes.

8 GB Budget: rails 1.8G | sidekiq 2.0G | postgres 2.0G | redis 512M

Set Distinct Docker mem_limit Caps for Puma, Sidekiq & Postgres
Telemetry verified 2026-10-31 by SidekiqHeap Triage.

Preventing Cascading Database Crashes During Ruby Spikes

Without container mem_limit guards, a leaking Sidekiq job can consume all free RAM until the Linux OOM killer terminates PostgreSQL—forcing lengthy WAL crash recovery and downtime across the whole helpdesk. Assigning deterministic ceilings forces only the offending worker to restart cleanly.

Pairing mem_limit with Graceful Restart Policies

Use restart: unless-stopped on rails and sidekiq alongside healthchecks. On an 8 GB KVM 2 host, reserve at least 1.5 GB for the Linux kernel, Docker daemon, and OS page cache.

Measured Thresholds & Configuration

Container Service8 GB KVM 2 Cap16 GB KVM 4 Cap
rails (Puma Web)1800m3584m
sidekiq (Workers)2048m4096m (across 2 pods)
postgres + pgvector2048m4608m
redis (Queues)512m1024m
8 GB Budget: rails 1.8G | sidekiq 2.0G | postgres 2.0G | redis 512M Deploy Hostinger KVM 4Vultr Cloud 8 GB ($40/mo)