Repository navigation
Run Solid Queue inside Puma as threads - #35
Merged
Merged
Conversation
Each forked Solid Queue process (supervisor, dispatcher, scheduler, worker) is a full copy of the app, about 200 MB each, inside a capped container. In async mode they run as threads in Puma's own process, which shares its database pool with Puma's threads, so the pool is 100.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Solid Queue's Puma plugin forked a supervisor, dispatcher, scheduler and worker, and each fork is a full copy of the app (~200 MB) inside a 1 GB-class container.
solid_queue_mode :asyncruns them as threads in Puma's own process instead. The database pool is now 100, since those threads share Puma's process and its pool.Both lines sit inside
if ENV['SOLID_QUEUE_IN_PUMA'], becausesolid_queue_modeonly exists once the plugin has loaded; a bare call would crash Puma in development. Checked on the devbox withSOLID_QUEUE_IN_PUMA=1:solid_queue_processeslists the async supervisor, dispatcher and worker under Puma's own pid, and/upanswers 200.Same change in all four akamai apps (invoices, hydra, edu, deures). Merging deploys.
No UI change.