-
Notifications
You must be signed in to change notification settings - Fork 210
Re-institute async mode #644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@joshleblanc thanks for this amazing job! I installed the fork in an app hosted on Heroku that servers webhooks from a live application. I've run it as a separate process though (as a worker). My So far it looks very good:
I used to run the worker before without recurring jobs because it would consume all RAM. Now, even with recurring jobs it takes ~2x less RAM! Thanks for sharing this work! |
|
I'd like to help get this finished up, so that non-forking implementations like JRuby can use Solid Queue. Is it complete enough that I could try to run on JRuby now and see what's missing? Do you have an example I could try? |
|
See #679 for my recent request to have a non-forking implementation. |
|
Just give me a bit.more time on the JEP-380 socket PR. I can talk to Cruby, C, or any other language using jruby as the layer via Linux Sockets. Separation of concerns. Let both interpreters run as independent processes and communicate via unix sockets and message pack. I should having it ready by this evening/tomorrow morning. |
|
Hey folks! Going to work on this one soon. Thanks for the help so far. |
Which was removed in rails#308 refactor: remove unused supervisor require statements fix: use 6075 instead of $ to get correct process ID in solid_queue plugin fix: don't modify array during iteration chore: remove duplicate code chore: logging refactor: remove async thread creation option from runnable process
The tests were removed in 4b3483a This also restores support for "standalone" async mode, which means the Solid Queue's supervisor running on its own process, via `bin/jobs`, but having all other processes (workers, dispatchers, schedulers) run as threads instead of processes. When Solid Queue is run via the Puma plugin, it won't be considered standalone, and it won't need to handle signals and act on them.
|
Hey @joshleblanc, @ka8725, I've pushed a bunch of changes to bring this to the finish line. If you have time, could you try running this in your apps to see if there are any problems? I'll do the same on Friday with one of our apps, as I've refactored a bunch of things that could also affect the regular fork mode. Then, if things are looking good, I'll merge this and release a new version. No rush! Just whenever you have time. |
|
Upgraded the gem in the app, it's not under load now. So need time to collect data. Will respond tomorrow. |
|







This is less of a "this is ready to be merged", and more of an effort to reinvigorate conversation around this feature. I cobbled this together as a proof of concept because I simply couldn't use the multi-process approach on the server I'm trying to deploy to. This is related to #343, and tries to naively reimplement this
I originally stumbled on this feature because I was testing Kamal on a 1GB VPS. The initial deploy would work, however there wasn't enough resource headroom for the second deploy. I narrowed this down to SQ using ~100MB per process, essentially taking up half the available memory on the system.
After implementing this change, I saw the application memory drop from ~700MB to ~270MB.
The usage is simply placing this in puma.rb
I currently have this deployed to a 1GB droplet - the application is running quickly, background jobs are running, and redeploys are succeeding