Forum: Ruby on Rails DB connection pooling support?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Joe S. (Guest)
on 2005-11-23 15:41
Does rails support connection pooling for DB connections?  Or are
connections just opened and closed as needed.

Thanks,
Joe
rasputnik (Guest)
on 2005-11-23 16:58
(Received via mailing list)
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/
tom (Guest)
on 2005-11-23 18:22
(Received via mailing list)
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
This topic is locked and can not be replied to.