Skip to content

Starting Puma with solid_queue plugin in Render.com fails #617

@megatux

Description

@megatux

Seems like it happens when forking.
Contents of my puma.rb

threads_count = ENV.fetch("RAILS_MAX_THREADS", 3)
threads threads_count, threads_count

# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
port ENV.fetch("PORT", 3000)

# Allow puma to be restarted by `bin/rails restart` command.
plugin :tmp_restart

# Specify the PID file. Defaults to tmp/pids/server.pid in development.
# In other environments, only set the PID file if requested.
pidfile ENV["PIDFILE"] if ENV["PIDFILE"]

if ENV["SOLID_QUEUE_IN_PUMA"]
  puts "---- DEBUG MSG: Solid Queue inside Puma ----"
  plugin :solid_queue
end
==> Running 'bundle exec puma -t 5:5 -p ${PORT:-3000} -e ${RACK_ENV:-development}'
---- DEBUG MSG: Solid Queue inside Puma ----
[117] Puma starting in cluster mode...
[117] * Puma version: 6.6.0 ("Return to Forever")
[117] * Ruby version: ruby 3.4.3 (2025-04-14 revision d0b7e5b6a0) +PRISM [x86_64-linux]
[117] *  Min threads: 5
[117] *  Max threads: 5
[117] *  Environment: production
[117] *   Master PID: 117
[117] *      Workers: 2
[117] *     Restarts: (✔) hot (✖) phased
[117] * Preloading application
[117] ! Unable to load application: TypeError: no implicit conversion from nil to integer
bundler: failed to load command: puma (/opt/render/project/.gems/bin/puma)
/opt/render/project/.gems/ruby/3.4.0/gems/solid_queue-1.2.1/lib/puma/plugin/solid_queue.rb:27:in 'Process.waitpid': no implicit conversion from nil to integer (TypeError)
      Process.waitpid(solid_queue_pid, Process::WNOHANG)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	from /opt/render/project/.gems/ruby/3.4.0/gems/solid_queue-1.2.1/lib/puma/plugin/solid_queue.rb:27:in 'stop_solid_queue'
	from /opt/render/project/.gems/ruby/3.4.0/gems/solid_queue-1.2.1/lib/puma/plugin/solid_queue.rb:21:in 'block in start'
	from /opt/render/project/.gems/ruby/3.4.0/gems/puma-6.6.0/lib/puma/events.rb:17:in 'block in Puma::Events#fire'
	from /opt/render/project/.gems/ruby/3.4.0/gems/puma-6.6.0/lib/puma/events.rb:17:in 'Array#each'
	from /opt/render/project/.gems/ruby/3.4.0/gems/puma-6.6.0/lib/puma/events.rb:17:in 'Puma::Events#fire'
	from /opt/render/project/.gems/ruby/3.4.0/gems/puma-6.6.0/lib/puma/events.rb:54:in 'Puma::Events#fire_on_stopped!'
	from /opt/render/project/.gems/ruby/3.4.0/gems/puma-6.6.0/lib/puma/launcher.rb:280:in 'Puma::Launcher#do_graceful_stop'
	from /opt/render/project/.gems/ruby/3.4.0/gems/puma-6.6.0/lib/puma/launcher.rb:445:in 'block in Puma::Launcher#setup_signals'
	from /opt/render/project/.gems/ruby/3.4.0/gems/tzinfo-2.0.6/lib/tzinfo/timestamp.rb:143:in 'Kernel#block_given?'
	from /opt/render/project/.gems/ruby/3.4.0/gems/tzinfo-2.0.6/lib/tzinfo/timestamp.rb:143:in 'TZInfo::Timestamp.for'
	from /opt/render/project/.gems/ruby/3.4.0/gems/tzinfo-2.0.6/lib/tzinfo/transition_rule.rb:39:in 'TZInfo::TransitionRule#at'
	from /opt/render/project/.gems/ruby/3.4.0/gems/tzinfo-2.0.6/lib/tzinfo/annual_rules.rb:66:in 'TZInfo::AnnualRules#apply_rule'
	from /opt/render/project/.gems/ruby/3.4.0/gems/tzinfo-2.0.6/lib/tzinfo/annual_rules.rb:51:in 'TZInfo::AnnualRules#transitions'
	from /opt/render/project/.gems/ruby/3.4.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/zoneinfo_reader.rb:326:in 'block in TZInfo::DataSources::ZoneinfoReader#apply_rules_with_transitions'
	from /opt/render/project/.gems/ruby/3.4.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/zoneinfo_reader.rb:326:in 'Integer#upto'
	from /opt/render/project/.gems/ruby/3.4.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/zoneinfo_reader.rb:326:in 'Enumerator#each'
	from /opt/render/project/.gems/ruby/3.4.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/zoneinfo_reader.rb:326:in 'Enumerable#flat_map'
	from /opt/render/project/.gems/ruby/3.4.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/zoneinfo_reader.rb:326:in 'TZInfo::DataSources::ZoneinfoReader#apply_rules_with_transitions'
	from /opt/render/project/.gems/ruby/3.4.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/zoneinfo_reader.rb:475:in 'TZInfo::DataSources::ZoneinfoReader#parse'
	from /opt/render/project/.gems/ruby/3.4.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/zoneinfo_reader.rb:42:in 'block in TZInfo::DataSources::ZoneinfoReader#read'
	from /opt/render/project/.gems/ruby/3.4.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/zoneinfo_reader.rb:42:in 'IO.open'
	from /opt/render/project/.gems/ruby/3.4.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/zoneinfo_reader.rb:42:in 'TZInfo::DataSources::ZoneinfoReader#read'
	from /opt/render/project/.gems/ruby/3.4.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/zoneinfo_data_source.rb:311:in 'TZInfo::DataSources::ZoneinfoDataSource#load_timezone_info'
	from /opt/render/project/.gems/ruby/3.4.0/gems/tzinfo-2.0.6/lib/tzinfo/data_source.rb:256:in 'block in TZInfo::DataSource#eager_load!'
	from /opt/render/project/.gems/ruby/3.4.0/gems/tzinfo-2.0.6/lib/tzinfo/data_source.rb:256:in 'Array#each'
	from /opt/render/project/.gems/ruby/3.4.0/gems/tzinfo-2.0.6/lib/tzinfo/data_source.rb:256:in 'TZInfo::DataSource#eager_load!'
	from /opt/render/project/.gems/ruby/3.4.0/gems/tzinfo-2.0.6/lib/tzinfo.rb:15:in 'TZInfo.eager_load!'
	from /opt/render/project/.gems/ruby/3.4.0/gems/railties-8.0.2/lib/rails/application/finisher.rb:81:in 'Array#each'
	from /opt/render/project/.gems/ruby/3.4.0/gems/railties-8.0.2/lib/rails/application/finisher.rb:81:in 'block in <module:Finisher>'
	from /opt/render/project/.gems/ruby/3.4.0/gems/railties-8.0.2/lib/rails/initializable.rb:32:in 'BasicObject#instance_exec'
	from /opt/render/project/.gems/ruby/3.4.0/gems/railties-8.0.2/lib/rails/initializable.rb:32:in 'Rails::Initializable::Initializer#run'
	from /opt/render/project/.gems/ruby/3.4.0/gems/railties-8.0.2/lib/rails/initializable.rb:61:in 'block in Rails::Initializable#run_initializers'
	from /opt/render/project/rubies/ruby-3.4.3/lib/ruby/3.4.0/tsort.rb:231:in 'block in TSort.tsort_each'
	from /opt/render/project/rubies/ruby-3.4.3/lib/ruby/3.4.0/tsort.rb:353:in 'block (2 levels) in TSort.each_strongly_connected_component'
	from /opt/render/project/rubies/ruby-3.4.3/lib/ruby/3.4.0/tsort.rb:434:in 'TSort.each_strongly_connected_component_from'
	from /opt/render/project/rubies/ruby-3.4.3/lib/ruby/3.4.0/tsort.rb:352:in 'block in TSort.each_strongly_connected_component'
	from /opt/render/project/rubies/ruby-3.4.3/lib/ruby/3.4.0/tsort.rb:350:in 'Rails::Initializable::Collection#each'
	from /opt/render/project/rubies/ruby-3.4.3/lib/ruby/3.4.0/tsort.rb:350:in 'Method#call'
	from /opt/render/project/rubies/ruby-3.4.3/lib/ruby/3.4.0/tsort.rb:350:in 'TSort.each_strongly_connected_component'
	from /opt/render/project/rubies/ruby-3.4.3/lib/ruby/3.4.0/tsort.rb:229:in 'TSort.tsort_each'
	from /opt/render/project/rubies/ruby-3.4.3/lib/ruby/3.4.0/tsort.rb:208:in 'TSort#tsort_each'
	from /opt/render/project/.gems/ruby/3.4.0/gems/railties-8.0.2/lib/rails/initializable.rb:60:in 'Rails::Initializable#run_initializers'
	from /opt/render/project/.gems/ruby/3.4.0/gems/railties-8.0.2/lib/rails/application.rb:440:in 'Rails::Application#initialize!'
	from /opt/render/project/src/config/environment.rb:5:in '<top (required)>'
	from config.ru:3:in 'Kernel#require_relative'
	from config.ru:3:in 'block (2 levels) in <top (required)>'
	from /opt/render/project/.gems/ruby/3.4.0/gems/rack-3.1.16/lib/rack/builder.rb:108:in 'Kernel#eval'
	from /opt/render/project/.gems/ruby/3.4.0/gems/rack-3.1.16/lib/rack/builder.rb:108:in 'Rack::Builder.new_from_string'
	from /opt/render/project/.gems/ruby/3.4.0/gems/rack-3.1.16/lib/rack/builder.rb:97:in 'Rack::Builder.load_file'
	from /opt/render/project/.gems/ruby/3.4.0/gems/rack-3.1.16/lib/rack/builder.rb:67:in 'Rack::Builder.parse_file'
	from /opt/render/project/.gems/ruby/3.4.0/gems/puma-6.6.0/lib/puma/configuration.rb:386:in 'Puma::Configuration#load_rackup'
	from /opt/render/project/.gems/ruby/3.4.0/gems/puma-6.6.0/lib/puma/configuration.rb:297:in 'Puma::Configuration#app'
	from /opt/render/project/.gems/ruby/3.4.0/gems/puma-6.6.0/lib/puma/runner.rb:169:in 'Puma::Runner#load_and_bind'
	from /opt/render/project/.gems/ruby/3.4.0/gems/puma-6.6.0/lib/puma/cluster.rb:373:in 'Puma::Cluster#run'
	from /opt/render/project/.gems/ruby/3.4.0/gems/puma-6.6.0/lib/puma/launcher.rb:203:in 'Puma::Launcher#run'
	from /opt/render/project/.gems/ruby/3.4.0/gems/puma-6.6.0/lib/puma/cli.rb:75:in 'Puma::CLI#run'
	from /opt/render/project/.gems/ruby/3.4.0/gems/puma-6.6.0/bin/puma:10:in '<top (required)>'
	from /opt/render/project/.gems/bin/puma:27:in 'Kernel#load'
	from /opt/render/project/.gems/bin/puma:27:in '<top (required)>'
	from /opt/render/project/.gems/gems/bundler-2.6.7/lib/bundler/cli/exec.rb:59:in 'Kernel.load'
	from /opt/render/project/.gems/gems/bundler-2.6.7/lib/bundler/cli/exec.rb:59:in 'Bundler::CLI::Exec#kernel_load'
	from /opt/render/project/.gems/gems/bundler-2.6.7/lib/bundler/cli/exec.rb:23:in 'Bundler::CLI::Exec#run'
	from /opt/render/project/.gems/gems/bundler-2.6.7/lib/bundler/cli.rb:452:in 'Bundler::CLI#exec'
	from /opt/render/project/.gems/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/command.rb:28:in 'Bundler::Thor::Command#run'
	from /opt/render/project/.gems/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in 'Bundler::Thor::Invocation#invoke_command'
	from /opt/render/project/.gems/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor.rb:538:in 'Bundler::Thor.dispatch'
	from /opt/render/project/.gems/gems/bundler-2.6.7/lib/bundler/cli.rb:35:in 'Bundler::CLI.dispatch'
	from /opt/render/project/.gems/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/base.rb:584:in 'Bundler::Thor::Base::ClassMethods#start'
	from /opt/render/project/.gems/gems/bundler-2.6.7/lib/bundler/cli.rb:29:in 'Bundler::CLI.start'
	from /opt/render/project/.gems/gems/bundler-2.6.7/exe/bundle:28:in 'block in <top (required)>'
	from /opt/render/project/.gems/gems/bundler-2.6.7/lib/bundler/friendly_errors.rb:117:in 'Bundler.with_friendly_errors'
	from /opt/render/project/.gems/gems/bundler-2.6.7/exe/bundle:20:in '<top (required)>'
	from /opt/render/project/.gems/bin/bundle:108:in 'Kernel#load'
	from /opt/render/project/.gems/bin/bundle:108:in '<main>'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions