Skip to content

Dropped network / db failover not supported because of pg@6.0.0 #311

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

Closed
robinbiondi opened this issue Dec 7, 2017 · 8 comments
Closed
Assignees

Comments

@robinbiondi
Copy link

Description/Steps to reproduce

Hello, we use loopback 2 for 2 years in production and we recently encountered some issues regarding the connection to the DB. This issue concerns version 2.x of loopback-connector-postgres

We experienced some RDS fail-overs which is not a big deal. The problem is that the connections in the connector pool weren't released and after the failover, connections were still trying to reach the DB emiting CONNECTION TIMEOUT errors. The result is that all our servers go down.

In order to reproduce:

  • Start a loopback server
  • Make some db requests
  • Restart the db
  • Make some request again

=> All the new requests will fail

Expected result

The normal behavior would be that the pool of connection goes empty and that new connections be created.

Additional information

We identified that this problem was caused by the library pg.
See the issue brianc/node-postgres#1075
This issue was fixed in this PR: brianc/node-postgres#1316

We saw that in version 3.x of loopback-connector-postgres, you decided to switch to pg@7
This would solve the problem here. We'd like to make a PR for that.

@dhmlau
Copy link
Member

dhmlau commented Dec 21, 2017

@robinbiondi , now that the PR #312 is merged, is this issue good to close? Thanks.

@dhmlau dhmlau self-assigned this Dec 21, 2017
@robinbiondi
Copy link
Author

@dhmlau , Yes. Good to close !

@robinbiondi
Copy link
Author

@dhmlau, Hello! Could you tell me when the fix of this issue will be available on an npm version ?

@dhmlau
Copy link
Member

dhmlau commented Jan 12, 2018

@robinbiondi , sorry about the delay. It's been released as 4.0.0. Thanks!

@robinbiondi
Copy link
Author

Hello @dhmlau, Shouldn't it be deployed as a 2.x version ?

@dhmlau
Copy link
Member

dhmlau commented Jan 12, 2018

@robinbiondi , you're right!! Looking into it now.

@dhmlau
Copy link
Member

dhmlau commented Jan 12, 2018

@robinbiondi, sorry about the confusion. The changes are now released as 2.9.0.
Thanks @bajtos for sorting it out!!

btw, do you have plans to move to 3.x? 2.x is currently in LTS, you'd get more recent bug fixes and better support in general for using 3.x. Please see http://loopback.io/doc/en/contrib/Long-term-support.html.

@robinbiondi
Copy link
Author

@dhmlau No problem. Thank you. Yes, we are thinking about it. But we don't have much time for that right now. Maybe later. :)

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

No branches or pull requests

2 participants