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.
717929a2f79c4e4d87dcb8cc3ae8957d?d=identicon&s=25 Joe Simone (jsimone)
on 2005-11-23 14:41
Does rails support connection pooling for DB connections?  Or are
connections just opened and closed as needed.

Thanks,
Joe
A52b0e1c5d982f2512a03c5dbfd033d6?d=identicon&s=25 rasputnik (Guest)
on 2005-11-23 15:58
(Received via mailing list)
On 23/11/05, Joe Simone <jesimone57@yahoo.com> 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/
2f46d76f0e5db4dc318b03be07ebaac4?d=identicon&s=25 tom (Guest)
on 2005-11-23 17:22
(Received via mailing list)
On 11/23/05, Dick Davies <rasputnik@gmail.com> 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.