-
Notifications
You must be signed in to change notification settings - Fork 118
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
Puma plugin :solid_queue throws an error on start #77
Comments
Hi @raphaeljlps, I've tested this out on a fresh Rails app and it works fine when I have If that's the issue here, adding If that's not what's going on here, do you have anything else you could share about your setup? |
Hey @djmb In my gem file I have
I've added If I do
|
Also experiencing this. Works as expected in dev but throws the |
Thanks @raphaeljlps - I can see that failing as well now. Loading the application first in
But that's not ideal. We'd maybe will want to shell out to the solid queue rake task or exe (once we add one) instead. |
same issue here : fine with
|
Same issue here, on Heroku. Why was this closed with no solutions? |
@atstockland there was a solution, we have @djmb workaround and I see a PR by @nashby. Are you still affected by this? I'm using the latests version on Render without issues and without the workaround. |
Sorry about that--I didn't realize that was the sanctioned work-around. I did try that, but the issue persisted for me. I'll try again, or try after the next update. Thanks so much! |
I must have had a compounding problems going on the first time I tried. I just updated my puma.rb to load the environment and everything works fine now. Thanks! |
Hey the problem is still here (on devlopement & production mode). # Procfile
puma: bundle exec puma -C config/puma/development.rb # config/puma/development.rb
bind "ssl://0.0.0.0:4000"
workers 2
threads 1, 3
plugin :solid_queue # solid_queue/lib/puma/plugin/solid_queue.rb
def start(launcher)
@log_writer = launcher.log_writer
@puma_pid = $$
launcher.events.on_booted do
puts "puma is booted..."
puts defined?(SolidQueue) ? "SolidQueue loaded" : "SolidQueue Not loaded"
puts defined?(SolidQueue::VERSION) ? "SolidQueue Version: #{SolidQueue::VERSION}" : "SolidQueue: Not loaded"
puts defined?(SolidQueue::Supervisor) ? "SolidQueue::Supervisor loaded" : "SolidQueue::Supervisor: Not loaded"
@solid_queue_pid = fork do
Thread.new { monitor_puma }
SolidQueue::Supervisor.start(mode: :all)
end
in_background do
monitor_solid_queue
end
end
launcher.events.on_stopped { stop_solid_queue }
launcher.events.on_restart { stop_solid_queue }
end
|
In my case i'm using cluster mode and phased restarts for Puma. So I wrote a gem to manage Capistrano tasks. It manages SolidQueue as a service in production mode and in development I launch it in Procfile https://github.com/IMMOSQUARE/immosquare-capistrano?tab=readme-ov-file#solidqueue-integration [Unit]
Description=SolidQueue for <%= "#{fetch(:application)} (#{fetch(:stage)})" %>
After=syslog.target network.target
[Service]
Type=simple
Environment=RAILS_ENV=<%= fetch(:stage) %>
User=<%= fetch(:solid_queue_user) %>
WorkingDirectory=<%= current_path %>
ExecStart=<%= Capistrano::Immosquare::Helpers.expanded_bundle_command %> exec rake solid_queue:start
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill -TERM $MAINPID
StandardOutput=append:<%= shared_path %>/log/solid_queue_access.log
StandardError=append:<%= shared_path %>/log/solid_queue_error.log
RestartSec=1
Restart=on-failure
SyslogIdentifier=<%= fetch(:solid_queue_service_unit_name) %>
[Install]
WantedBy=default.target |
I'm trying to use puma plugin :solid_queue but I get an error
this happens on my MacBook (M1) and in my linux server/container
my solid_queue.yml
The full stack
The text was updated successfully, but these errors were encountered: