Rails creates one connection on startup and uses it for all
communication with the database.
Obviously in the case of CGI this means one connection for each
request because rails is closed after the request is done.
My production server spawns 5 processes of the main rails application,
so there exist 5 permanent connections to the database. This is quasi
a pool.
On Wed, 15 Dec 2004 13:56:06 -0600, ChongQing Xiao
<CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org>
wrote:> Hi:
>
> Does rails share database connection between different web request?
> >From the code, it appears it connect and disconnect to db for each
> request cycle.
>
> As I understand, it will be more efficient and more scalable if the
> connection can be shared.
>
> Thanks
> chong
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Tobi
http://blog.leetsoft.com