Rack middleware for shared connection pools?

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
causing the DB to not have enough connections remaining for new

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

Is there any middleware that extends Sequel’s or ActiveRecord’s
pool to do this? (Or some code that someone can suggest to do this?)


On Thursday, March 27, 2014 4:05:30 PM UTC, Jeff wrote:


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


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs