我们正在从Passenger转移到Puma,一切都在某些应用程序中运行但是对于另一个应用程序我们收到此错误:
ActiveRecord::ConnectionTimeoutError - could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use:
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:202:in `block in wait_poll'
这是在第5次请求之后发生的。我们将其与默认数据库连接pool
大小连接为5。
我们可以更新此号码,但是:
答案 0 :(得分:0)
将puma
gem添加到我的Gemfile
可以解决问题:
group :production do
gem "puma"
end