-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PostgreSQLAdapter::reconnect! fails when Postgres restarted (Rails 3.1) #3160
Comments
I've made a pull request to fix this issue: #3258 |
+1, this took our production site down several times, and we almost had to rollback to Rails 3.0. The fix seems to work. |
@tenderlove appears to be one of the goto people for Postgres issues. Can we get this tagged for the 3.1.2 milestone? |
Sorry folks, I was going to merge this but it slipped my mind. I've merged to 3-1-stable and master. Thanks for the patch! |
Unfortunately this did not resolve the problem for me. There's another open issue regarding this problem - I've added a couple of notes there. See #3392 |
Rails never recovers when we re-start Postgres; all subsequent requests fail as follows:
Rails is detecting that the connection has gone away, and is calling into
PostgreSQLAdapter::reconnect!
, but this fails in the call toclear_cache!
, which attempts to call@connection.query
if@statements
is non-empty.We've monkeypatched the issue as follows:
The text was updated successfully, but these errors were encountered: