1
如果我在Heroku配置中设置了WEB_CONCURRENCY = 3,为什么我会有4个Puma工人?设置Heroku上的Puma工人数量
在this question中,我了解到New Relic称Puma worker为“app instances”。
这里是我的puma.rb
配置:
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
threads_count = Integer(ENV['MAX_THREADS'] || 1)
threads threads_count, threads_count
preload_app!
rackup DefaultRackup
port ENV['PORT'] || 3000
environment ENV['RACK_ENV'] || 'development'
on_worker_boot do
# Valid on Rails 4.1+ using the `config/database.yml` method of setting `pool` size
ActiveRecord::Base.establish_connection
end
Heroku的配置:
WEB_CONCURRENCY: 3
谢谢。主进程是否像工人一样使用内存? – user1515295