Concurrency and Database Connections in Ruby with ActiveRecord | Heroku Dev Center
Configuring database connections in the Active Record connection pool for apps running with a multi-threaded or multi-process web server.