Skip to content

Conversation

@nbudin
Copy link

@nbudin nbudin commented Apr 18, 2012

Recent versions of ActiveRecord don't automatically release connections back into the pool. Without this patch, the user has to manually set up this hook if they don't want every nth request to hang for 5 seconds (where n is the number of connections in the pool).

@mcfiredrill
Copy link

I'm using this too, found out about it via this thread:

https://groups.google.com/forum/#!msg/copenhagen-ruby-user-group/GEHgi_WudmM/gnCiwWqmVfMJ

@janko
Copy link

janko commented May 22, 2012

You can download the new version of the gem, I've submitted your commit. I'm the new maintainer now, here's my fork :)

@mcfiredrill
Copy link

👍

@nbudin
Copy link
Author

nbudin commented May 27, 2012

Great, thanks janko-m! Glad to meet the new maintainer in town, and it looks like you're already doing great work with your fork.

@janko
Copy link

janko commented May 27, 2012

My pleasure :)

mediaslave24 referenced this pull request in mediaslave24/sinatra-activerecord Jul 18, 2013
@cefigueiredo
Copy link

Some news about that PR? I'm gettin struck by this problem too... sinatra-activerecord are not releasing a connection, and creating some until the pool cap, getting exceptions on every request after!

@janko
Copy link

janko commented Sep 1, 2014

Well, the PR is merged, so if you're still having problems, post an issue to janko-m/sinatra-activerecord.

@lksv
Copy link

lksv commented Aug 25, 2015

why don't use middleware: use ActiveRecord::ConnectionAdapters::ConnectionManagement?

janko added a commit to sinatra-activerecord/sinatra-activerecord that referenced this pull request Aug 25, 2015
@janko
Copy link

janko commented Aug 25, 2015

@lksv Thanks, I didn't know that existed. It's certainly a more robust way, so I updated the gem and released a new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants