The project is in a healthy, maintained state
Detect queue lag, dead workers, unsafe thread/pool configuration, and broken recurring jobs before they become incidents.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 2.5
>= 0
~> 5.0
>= 2.1
>= 1.0
>= 6.0
>= 7.1, < 9.0
~> 1.75
~> 2.1

Runtime

>= 7.1, < 9.0
>= 7.1, < 9.0
>= 7.1, < 9.0
>= 7.1, < 9.0
>= 7.1, < 9.0
>= 1.0, < 2.0
 Project Readme

Gem Version Ruby 3.1+ Rails 7.1–8.x CI MIT License

solid_queue_guard

Your Solid Queue production doctor.
Catch dead workers, queue lag, and broken config before the 3am page.

Quick start · What it checks · Checks · Configuration · Mission Control · Changelog


Rails 8 ships with Solid Queue. Redis is optional. Production config is not.

Your web tier can be green while your jobs are dead. solid_queue_guard catches that before it becomes an incident.

Mission Control shows what is happening. solid_queue_guard warns what is dangerous.


Why this exists

Symptom What actually happened
"Site is up, emails stopped" Workers dead, heartbeats stale
"Only 3 jobs in the queue, why the panic?" Oldest job waiting 40 minutes — lag, not depth
"Recurring billing just… stopped" Scheduler not running
"Jobs hang after deploy" Thread count > DB pool
"Health check passes, jobs don't" /up doesn't know Solid Queue exists

🚀 Quick start

bundle add solid_queue_guard
bin/rails solid_queue_guard:install
bin/rails solid_queue_guard:doctor
# config/routes.rb
mount SolidQueueGuard::Engine, at: "/solid_queue_guard"
curl localhost:3000/solid_queue_guard/health
SOLID_QUEUE_GUARD_STRICT=1 bin/rails solid_queue_guard:doctor   # CI gate
bin/rails solid_queue_guard:report                              # config + runtime

Full options: docs/configuration.md

Operational surfaces

Surface Command / URL Best for
Doctor bin/rails solid_queue_guard:doctor Local pre-deploy, config review
CI gate SOLID_QUEUE_GUARD_STRICT=1 bin/rails solid_queue_guard:doctor Block bad merges
Report bin/rails solid_queue_guard:report Config + live queue DB
HTTP health GET /solid_queue_guard/health Kamal, ECS, K8s, UptimeRobot
Guard tab GET …/applications/:application_id/guard Human checks in Mission Control

CLI extras: SOLID_QUEUE_GUARD_FORMAT=json, SOLID_QUEUE_GUARD_SCOPE=config|runtime|all.


👨‍⚕️ See it in action

SolidQueueGuard Report

Status: DEGRADED

Checks:
✅ Active Job adapter is :solid_queue
❌ Worker threads: 10, queue DB pool: 5
⚠️ No workers configured for "mailers" queue

Suggested fixes:
- Increase queue DB pool to at least 12 or reduce worker threads

One command. Actionable output. No Datadog required to get started.


🩺 What it checks

Config (pre-deploy / CI): adapter, queue DB, schema, thread vs pool sizing, worker coverage, scheduler/recurring.yml, env flags, Puma co-location, topology recommendations.

Runtime (production health): queue lag, stale processes, missing roles (supervisor/worker/dispatcher/scheduler), failed jobs, recurring staleness, blocked/orphaned claims, paused-queue lag, pidfile, finished-jobs growth.

Full ID list and thresholds: docs/checks.md


🛡️ Mission Control dashboard

Opt-in Guard tab for Mission Control — Jobs:

gem "mission_control-jobs"

SolidQueueGuard.configure { |config| config.integrate_mission_control = true }

mount MissionControl::Jobs::Engine, at: "/jobs"
mount SolidQueueGuard::Engine, at: "/solid_queue_guard"

Guard tab in Mission Control

Requires mission_control-jobs and an asset pipeline (Propshaft or Sprockets). Load balancers should keep using /solid_queue_guard/health.


Observability

Operational Datadog metrics

Opt-in continuous depth gauges (same DB source as Mission Control) plus Active Job event counters:

bundle add dogstatsd-ruby
bin/rails generate solid_queue_guard:metrics

Emits solid_queue.ready.count, solid_queue.ready.oldest_age_seconds, failed/claimed/scheduled counts, and solid_queue.jobs.* — see docs/configuration.md.

Notifications & health export

On non-healthy CLI runs you can notify via Rails logger, Slack, Datadog events, or a generic webhook (config.notify_with). Guard health status can also export to StatsD, Prometheus, or OpenTelemetry (config.metrics_backends).


Public API (v1.0+)

Stable until 2.0semantic versioning:

API Description
SolidQueueGuard.configure Block-style configuration
solid_queue_guard:doctor Config readiness report
solid_queue_guard:report Full diagnostic report
solid_queue_guard:health Machine-readable JSON health
mount SolidQueueGuard::Engine HTTP health endpoint
config.integrate_mission_control Guard tab (requires mission_control-jobs)
config.emit_depth_metrics / emit_event_metrics Operational Datadog gauges/counters (requires dogstatsd-ruby)
bin/rails generate solid_queue_guard:metrics Wire depth recurring job + event flags
config.notify_with / metrics_backends CLI notifications and health-status export

Internal check classes and registry are @api private.


⚔️ vs Mission Control

Mission Control solid_queue_guard
Purpose Inspect & manage jobs Detect production risk
Config doctor No Yes
Pre-deploy / CI gate No Yes
Queue lag alerts No Yes
HTTP health for LBs No Yes

Use both.


Compatibility

Gem version Ruby Rails
1.5.x 3.1+ 7.1, 7.2
1.5.x 3.2+ 8.0+
1.2.x–1.4.x 3.1+ 7.1, 7.2
1.2.x–1.4.x 3.2+ 8.0
1.0.x–1.1.x 3.1+ 7.1, 7.2, 8.0

See CHANGELOG.md for release notes.


Development

See CONTRIBUTING.md for setup, bin/console, Appraisal matrix, and script/validate_revelo.sh.

bundle exec rake test
bundle exec rubocop
bundle exec appraisal rake test
gem build solid_queue_guard.gemspec

License

MIT — see MIT-LICENSE.


Run the doctor before you run the deploy.
Built for Rails teams who chose Solid Queue and still sleep at night.