Skip to content

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

Closed
@robinbiondi

Description

@robinbiondi

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions