Solid Queue Rails support means background jobs that run from your database: Solid Queue is the Active Job backend that ships with Rails 8, and it stores your background jobs in a SQL database (PostgreSQL, MySQL or SQLite) instead of Redis. A new Rails app can run jobs with no extra service to install, pay for or monitor.
This guide shows how Solid Queue works, how to set it up on PostgreSQL, and how to use the features beyond perform_later: concurrency limits, recurring jobs and batches. It also covers the production details that tutorials skip, like connection pool sizing, jobs lost to killed processes, and transaction timing. If your app already uses Sidekiq, there is a section on adopting Solid Queue one job at a time. For the bigger picture of when to move work to jobs, see my guide to scaling a Ruby on Rails application.
I ran the examples in this article against Solid Queue 1.7.2 on Rails 8.1.4.1 and Ruby 3.3.6, with SQLite in development. The PostgreSQL configuration and the production advice come from the official README and Rails source, not from a production run I did for this article.
What Solid Queue is
Active Job is the Rails layer that lets you write MyJob.perform_later(args) once and run it on different backends. Solid Queue is one of those backends. It is built by the Rails team and maintained in the rails/solid_queue repository under the MIT licence.
Its design goal is simplicity. Jobs are rows in database tables. Workers poll those tables and, where the database supports it, use FOR UPDATE SKIP LOCKED so several workers can claim jobs without blocking each other. PostgreSQL 9.5+, MySQL 8+ and MariaDB 10.6+ support that clause. SQLite works too, and the README describes it as suitable for smaller applications.
Solid Queue does not replace Active Job’s own features. Retries, discarding, serialization and delayed jobs still come from Active Job. Solid Queue adds what Active Job doesn’t define: concurrency controls, recurring tasks, pausing queues, and batches.
Why it is the default now
Rails 8.0 was released on November 7, 2024, and new apps have used Solid Queue since. As of November 5, 2026, the latest Solid Queue release on RubyGems is 1.7.2 (November 3, 2026) and the latest Rails release is 8.1.4.1 (November 4, 2026). The gem has more than 29 million downloads, and releases are frequent.
The practical reason is operations. With Redis-backed queues you run and secure a Redis server, watch its memory, and make sure the job data survives a restart. With Solid Queue, jobs live in the database you already back up and monitor. Rails 8 uses the same idea for caching (Solid Cache) and Action Cable (Solid Cable). I covered how that fits a startup budget in why Ruby on Rails is still a great choice for SaaS startups.
How it works: four kinds of process
When you run bin/jobs, you start a supervisor. It forks and monitors three kinds of processes:
| Process | What it does |
|---|---|
| Worker | Claims ready jobs from the queues it is assigned and runs them in a thread pool |
| Dispatcher | Moves scheduled jobs that are now due into the ready state, and does maintenance for concurrency limits and batches |
| Scheduler | Enqueues recurring tasks when they are due |
| Supervisor | Starts the others, tracks their heartbeats, and restarts or stops them |
The default fork mode gives each process its own isolation. The README says to prefer it over async mode (everything in one process) unless you have strong reasons.
Set it up
In a new Rails 8 app, Solid Queue is already configured. The generator created config/queue.yml, config/recurring.yml, db/queue_schema.rb and bin/jobs, and config/environments/production.rb contains:
# config/environments/production.rb
config.active_job.queue_adapter = :solid_queue
config.solid_queue.connects_to = { database: { writing: :queue } }For an existing app on Rails 7.1 or newer (Ruby 3.2+), install it yourself:
bundle add solid_queue
bin/rails solid_queue:installGive the queue its own database
The README recommends a separate database for the queue. With PostgreSQL, that can be a second database on the same server:
# config/database.yml
production:
primary: &primary_production
<<: *default
database: app_production
username: app
password: <%= ENV["APP_DATABASE_PASSWORD"] %>
queue:
<<: *primary_production
database: app_production_queue
migrations_paths: db/queue_migrateRun bin/rails db:prepare and the queue schema loads into the second database. Two reasons to do this. Job traffic is write-heavy and shouldn’t compete with your web queries for the same tables and connections. And it removes a transactional trap, covered below.
You can use a single database if you prefer: copy the contents of db/queue_schema.rb into a normal migration, remove the connects_to line, and migrate.
Use it in development
By default only production uses Solid Queue. To try it locally, add the adapter and the queue database to the development environment as well:
# config/environments/development.rb
config.active_job.queue_adapter = :solid_queue
config.solid_queue.connects_to = { database: { writing: :queue } }Add a queue entry under development in database.yml, run bin/rails db:prepare, then start bin/jobs in a second terminal. Job output goes to the normal Rails log, while the Solid Queue process logs (claims, dispatches, errors) print to the terminal, which is useful to see what the supervisor is doing.
Where to run it
For a small app, run the supervisor inside Puma with the plugin. The Rails 8 puma.rb has this line, switched on by an environment variable:
# config/puma.rb
plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"]This is the cheapest setup: one container runs the web server and the jobs. The README notes one limit: phased restarts are not supported with the plugin.
When job load grows, run bin/jobs as its own process or container, on the same machine or on separate ones. You can run it on several machines at once. That lets you scale web servers and workers independently.
Write jobs as usual
Nothing changes in your job classes:
# app/jobs/flaky_job.rb
class FlakyJob < ApplicationJob
retry_on RuntimeError, wait: 1.second, attempts: 3
def perform
Rails.logger.info "attempt #{executions}"
raise "boom" if executions < 3
end
endI ran this one: it failed twice, was retried with the one-second wait, and succeeded on the third attempt. Retries are Active Job’s. Solid Queue just stores the retry as a new scheduled execution.
Configure workers and queues
config/queue.yml controls how many processes and threads run. The file generated by Rails 8 is short:
# config/queue.yml
default: &default
dispatchers:
- polling_interval: 1
batch_size: 500
workers:
- queues: "*"
threads: 3
processes: <%= ENV.fetch("JOB_CONCURRENCY", 1) %>
polling_interval: 1A more realistic setup separates urgent from slow work, so a large export can’t delay password-reset emails:
# config/queue.yml
production:
dispatchers:
- polling_interval: 1
batch_size: 500
workers:
- queues: [ real_time, default ]
threads: 5
processes: 2
polling_interval: 0.1
- queues: [ exports, imports ]
threads: 2
polling_interval: 1Three rules from the README worth remembering:
- Queue order beats priority. With
[ real_time, default ], no job is taken fromdefaultwhilereal_timehas waiting jobs. Numeric priorities (lower number, higher priority) only order jobs inside a queue. The authors recommend choosing one approach, not mixing both. - Match threads to the connection pool. Set
threadsto at most the queue database pool size minus 2, because each worker also uses connections for polling and heartbeats. - Wildcards are limited.
*works on its own or at the end of a name (staging*), not at the start.
Limit concurrency without Redis locks
A common need: never run two syncs for the same account at the same time. Solid Queue has this built in:
# app/jobs/sync_account_job.rb
class SyncAccountJob < ApplicationJob
limits_concurrency to: 1, key: ->(account_id) { account_id },
duration: 5.minutes
def perform(account_id)
Rails.logger.info "[sync] start account=#{account_id}"
sleep 1
Rails.logger.info "[sync] done account=#{account_id}"
end
endI enqueued three jobs for account 42 and one for account 7. The log showed account 7 running in parallel with the first job for account 42, while the other two account-42 jobs waited and ran one after the other.
Details that matter in production:
- Excess jobs are blocked by default and released when the running job finishes. Use
on_conflict: :discardto drop duplicates instead. Be careful with discard: if a running job fails to release its lock, conflicting jobs are discarded untildurationpasses. durationis a failsafe, not a timeout. It covers a worker that dies without releasing its lock. Set it well above your job’s real runtime.- There is no guarantee about execution order, only that jobs with the same key don’t overlap.
- Concurrency controls add overhead, because blocked executions and semaphores are extra writes. For plain throttling with a limit well above 1, the README suggests a dedicated queue with a worker that has a small
threadsvalue. - Don’t combine concurrency controls with
perform_all_later. Controlled jobs must be enqueued one by one, so you lose bulk enqueuing.
Recurring jobs
Solid Queue replaces cron or the whenever gem for most scheduled work. Define tasks in config/recurring.yml:
# config/recurring.yml
production:
nightly_cleanup:
class: CleanupJob
queue: background
schedule: every day at 3am
clear_solid_queue_finished_jobs:
command: "SolidQueue::Job.clear_finished_in_batches(sleep_between_batches: 0.3)"
schedule: every hour at minute 12Schedules use the Fugit syntax, so both cron strings and phrases like every day at 9am work. A task has either a class or a command. Without a time zone in the schedule, config.time_zone is used. In my test, a task defined as every 3 seconds was enqueued on time by the scheduler.
Two details to know:
- You can run schedulers on several servers for redundancy. A unique database record per task and time prevents duplicate enqueuing, as long as
preserve_finished_jobsstays at its default oftrue. - If you remove every static task from the file, the old ones stay in the table and keep showing in dashboards. Clean them with
SolidQueue::RecurringTask.static.delete_all.
Note the second task above. Finished jobs are kept by default and cleared after one day when something calls the clear method, which is why the generated recurring.yml includes that hourly cleanup. Keep it, or the jobs table keeps growing.
Batches
Newer Solid Queue versions can group jobs and run a callback when the group is done. This fits imports, bulk emails or any “do N things, then tell the user” flow:
# app/jobs/import_finished_job.rb
class ImportFinishedJob < ApplicationJob
def perform
Rails.logger.info "finished total=#{batch.total_jobs} failed=#{batch.failed_jobs}"
end
end
SolidQueue::Batch.enqueue(on_finish: ImportFinishedJob, source: "csv") do
rows.each { |row| ImportRowJob.perform_later(row) }
endI ran this with three small jobs, and the callback fired once with total=3 failed=0. There are also on_success and on_failure callbacks. Callbacks must be real job classes that exist in the app: my first attempt defined the class inside a one-off script, and the callback failed with UnknownJobClassError because the worker process couldn’t load it.
If your database was set up before batches existed, the README says to run bin/rails solid_queue:update and then db:migrate. Until you do, jobs work as before and batches raise an error. The README notes the batch tables become part of the base schema in Solid Queue 2.0.
Production pitfalls
Jobs and transactions
When jobs and app data share one database, a job enqueued inside a transaction commits or rolls back with that transaction. That is convenient, until you move the queue to its own database or another backend and a job starts running before the data it needs is committed.
Rails 8 has a setting that makes the behavior explicit and backend-independent:
# app/jobs/application_job.rb
class ApplicationJob < ActiveJob::Base
self.enqueue_after_transaction_commit = true
endIt defaults to false. With it on, a job enqueued inside a transaction waits until the transaction commits. I recommend turning it on for all jobs in a new app, whether or not you use a separate queue database.
Failed jobs stay until you act
Solid Queue keeps failed jobs in solid_queue_failed_executions. Nothing retries them for you beyond Active Job’s retry_on. Inspect and retry them from a console:
failed = SolidQueue::FailedExecution.find(id)
failed.error # why it failed
failed.retry # enqueue again
failed.discard # delete itFor a web UI, the Rails team maintains mission_control-jobs (MIT, latest release 1.3.1 on September 9, 2026). If you use Sentry or Rollbar, check that job errors reach them, and use Rails.error.report in a rescue_from otherwise, as the README shows.
Killed processes are not retried
If a worker is killed with SIGKILL, for example when a container hits its memory limit, its running jobs can’t be released. Other processes later notice the missing heartbeat and mark those jobs as failed with SolidQueue::Processes::ProcessPrunedError. Solid Queue deliberately doesn’t retry them, because the job itself may be what killed the process.
Active Job’s retry_on doesn’t apply here, since the error is recorded by a different process after the fact. So make jobs idempotent, watch for these failures, and only add automatic recovery (the README shows a notification subscriber) for jobs you know are safe to repeat.
Smaller things
- Give the queue database a pool that fits
threadsplus overhead, as above. - If you use Turbo Streams broadcasts, remember they enqueue jobs too. Solid Queue raises
SolidQueue::Job::EnqueueErrorfor database errors at enqueue time, so a full or unreachable queue database can break those code paths. - Running Solid Queue in Puma needs the queue database to be reachable at boot, or Puma exits with it.
- On SQLite, one machine writes the file. Use PostgreSQL or MySQL once jobs run on several servers.
A checklist before launch:
- Queue database created and
db:prepareruns on deploy -
threadsfits the queue database pool - Slow and urgent jobs are on separate queues
-
enqueue_after_transaction_commitdecided on purpose - Jobs are idempotent
- Failed jobs are visible (Mission Control or error tracking)
- The hourly cleanup task is still in
recurring.yml
Solid Queue vs Sidekiq
Both are good. They make different trade-offs:
| Solid Queue | Sidekiq | |
|---|---|---|
| Storage | Your SQL database | Redis |
| Extra service | None | Redis server |
| Default in Rails 8 | Yes | No |
| Transactional enqueue | Possible with a shared database | No, jobs live outside the database |
| Raw throughput and latency | Bounded by the database | Designed for very high throughput |
| Retries | Active Job’s | Sidekiq’s own retry system, or Active Job’s |
Sidekiq (latest release 8.1.7 on August 17, 2026) is still actively maintained. I haven’t benchmarked the two, and the numbers in public comparisons vary a lot with the database, hardware and job mix, so measure your own workload before deciding on throughput alone. My rule of thumb: keep Sidekiq if you already run Redis and your jobs are performance-critical. Choose Solid Queue for new apps and for teams that want fewer moving parts.
Move an existing app from Sidekiq
You don’t have to switch everything in one deploy. Active Job lets you set the adapter per job class:
# app/jobs/weekly_report_job.rb
class WeeklyReportJob < ApplicationJob
self.queue_adapter = :solid_queue
endA safe order:
- Install Solid Queue and create the queue database. Leave the global adapter on Sidekiq.
- Move one low-risk job, such as a report or cleanup, and watch it for a week.
- Move mailers and other plain Active Job classes.
- Rewrite jobs that use Sidekiq-only APIs (
perform_async,sidekiq_options) to Active Job (perform_later,queue_as). - Drain the Sidekiq queues and remove the gem and Redis when nothing uses them.
This kind of staged job migration is part of the legacy Rails modernization work I do: moving older apps to current Rails without a big-bang rewrite.
What’s next
Batches already live in the current release, and the README says their tables become part of the base schema in Solid Queue 2.0. I haven’t seen a published 2.0 date, so treat it as upcoming and check the releases page and UPGRADING.md before you upgrade across a major version.
If you’re on an older release, start with my Rails 8.1 upgrade guide. For the cache half of the Solid trio, see Solid Cache in Rails 8.
Conclusion
Solid Queue is a solid default for Rails 8 apps: no Redis to run, jobs in a database you already trust, and enough features (priorities, concurrency limits, recurring tasks, batches) for most products. Put it on its own database, size threads to the pool, decide on enqueue_after_transaction_commit, and make your jobs idempotent so a killed process doesn’t hurt.
If you’re on an older Rails version, or want your background jobs reviewed before they cause an incident, I can help: upgrading to Rails 8, moving Sidekiq jobs to Solid Queue in stages, and setting up queues, monitoring and deploys that fit your traffic. Send me a short brief and book a discovery call.
Frequently asked questions
What is Solid Queue in Rails?
Solid Queue is a database-backed Active Job backend built by the Rails team and the default in Rails 8. It stores jobs in PostgreSQL, MySQL or SQLite and runs them with workers started by bin/jobs. It is MIT licensed.
Does Solid Queue need Redis?
No. Jobs, schedules and locks all live in SQL tables. Your app can still use Redis for other things, but Solid Queue itself doesn’t need it.
Which Rails and Ruby versions does Solid Queue support?
The README states a minimum of Rails 7.1 and Ruby 3.2. Rails 8 includes it by default.
Is Solid Queue production-ready?
It is the default in Rails 8 and under active development: version 1.7.2 was released on November 3, 2026. Production readiness still depends on your load and setup, so use a separate queue database, tune threads, and monitor failed jobs.
Should I use PostgreSQL or SQLite for Solid Queue?
Use PostgreSQL or MySQL if jobs run on more than one server or at higher volume, because they support FOR UPDATE SKIP LOCKED. SQLite is fine for small apps on one machine.
How do I run Solid Queue in development?
Set the adapter and connects_to in development.rb, add a queue database to database.yml, run bin/rails db:prepare, then start bin/jobs. Or enable the Puma plugin so one command starts both.
How do I see and retry failed jobs?
Use the mission_control-jobs gem for a web dashboard, or a console with SolidQueue::FailedExecution and its retry and discard methods.
Is Solid Queue faster than Sidekiq?
I haven’t measured it, and I wouldn’t expect it to be faster for raw throughput, since Sidekiq is built around Redis and very high job rates. For most apps, job speed is not the bottleneck; the work inside the job is.


