Skip to content

Conversation

@ashwin47
Copy link
Contributor

@ashwin47 ashwin47 commented Jan 8, 2026

Replace Resque with Solid Queue as it is the recommended default for Rails.

I noticed an increase in memory usage after the switch. This is expected with Solid Queue's forking architecture. We can overcome this with async mode (rails/solid_queue#644), which runs everything as threads inside Puma instead, giving us lower memory usage than Resque.

Changes

  • Replace resque + resque-pool gems with solid_queue
  • Use async mode – runs workers as threads inside Puma instead of separate processes
  • Add separate SQLite database for queue storage
  • Remove workers process from Procfile (jobs run inside Puma)

We can wait until the async PR is merged before going ahead with this

cc @rosa

@rosa
Copy link
Member

rosa commented Jan 8, 2026

Hey @ashwin47, even if we switched Campfire to Solid Queue, I wouldn't set the async mode in any case. The fork mode is the recommended one and the default, as it's the only way you can use multiple CPUs. Running everything in the same process might use less memory, but it'll also be a significant downgrade in performance.

As for the migration from Resque to Solid Queue, I think this would be something to discuss with maintainers before even opening a PR 🤔

@ashwin47 ashwin47 force-pushed the replace-resque-with-solid-queue branch from 57ca919 to fde5dbe Compare January 16, 2026 12:02
Switch to official solid_queue gem and use fork mode (the default)
for multi-CPU support. Async mode remains available as opt-in via
SOLID_QUEUE_IN_PUMA=true for memory-constrained environments.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@ashwin47 ashwin47 force-pushed the replace-resque-with-solid-queue branch from fde5dbe to 4631f4a Compare January 16, 2026 12:06
@ashwin47
Copy link
Contributor Author

Thanks for the feedback @rosa! You're absolutely right about fork mode being the better default. I was too focused on keeping the memory under control because I have an instance running on a small VPS.

I've updated the PR to:

  • Use fork mode as the default (via separate jobs process in Procfile)
  • Switch to the official solid_queue gem instead of the async-mode fork
  • Keep async mode as an opt-in option (SOLID_QUEUE_IN_PUMA=true) for
    memory-constrained environments

Regarding discussing with maintainers first — totally fair point. But i feel its time to switch to solid_queue as its the default.

Happy to close this if it's not something being considered, or continue iterating if there's interest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants