Hi, just a small question on the way connections are managed in 
ActiveRecord.

>From the best I can gather reading the code (and based on behaviour), 
ActiveRecord will check a connection out of the pool the first time a 
thread asks for one, then that thread will continue to hang on to the 
connection until it is closed. What is the reasoning behind this approach 
as opposed to checking out a connection for each DB operation and letting 
go of it once the operation is completed?

My team has had a couple of issues with this (leading to us needing to use 
a connection pool equal to the number of threads being used by our server, 
which is not really a big problem, but feels a bit counter-intuitive). This 
pos 
<https://groups.google.com/d/msg/rubyonrails-core/Z4eiyPnGjwk/21a5KSL_YlIJ>t 
is on much the same subject. I'm really just curious about the way this 
works.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to