Ruby on Rails Thursday, March 27, 2014



On Thursday, March 27, 2014 4:05:30 PM UTC, Jeff wrote:
I have a Rails app that makes connections to other DBs. There may be multiple users connecting to multiple DBs.

The app makes a database connection as part of an action.  However, I noticed a problem: there's too many DB connections remaining open, which is causing the DB to not have enough connections remaining for new connections.

So the answer is using a shared connection pool. Importantly, the connection pool needs to be shared amongst different actions / HTTP requests.

 
I don't know of a middleware that does this but you might want to look at the connection_pool gem ( https://github.com/mperham/connection_pool ) 

Fred

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c4cec3e2-1f63-4f95-8696-1c2f82ba0734%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment