DB connection pooling support?


#1

Does rails support connection pooling for DB connections? Or are
connections just opened and closed as needed.

Thanks,
Joe


#2

On 23/11/05, Joe S. removed_email_address@domain.invalid wrote:

Does rails support connection pooling for DB connections? Or are
connections just opened and closed as needed.

DB connection pooling doesnt’ make much sense for Rails.
Generally you have fastcgi children, each with their dbhandle, which
are themselves started and stopped by the webserver as needed.

Think of them like threads in a servlet engine.


Rasputin :: Jack of All Trades - Master of Nuns
http://number9.hellooperator.net/


#3

On 11/23/05, Dick D. removed_email_address@domain.invalid wrote:

DB connection pooling doesnt’ make much sense for Rails.
Generally you have fastcgi children, each with their dbhandle, which
are themselves started and stopped by the webserver as needed.

This is true running under FastCGI (though connection timeouts can
still be an issue). Under other environments, such as WEBrick or
using ActiveRecord standalone, this isn’t always the case. There is
work being done towards an adapter pool for ActiveRecord, see
http://dev.rubyonrails.org/ticket/2162

Tom