Skip to content
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

"Connection terminated unexpectedly" and "Client has encountered a connection error and is not queryable" #5223

Closed
seriousManual opened this issue Dec 11, 2019 · 4 comments

Comments

@seriousManual
Copy link

Issue type:

[x ] question
[ ] bug report
[ ] feature request
[ ] documentation issue

Database system/driver:

[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql / mariadb
[ ] oracle
[x ] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo

TypeORM version:

[ ] latest
[ ] @next
[x ] 0.2.20 (or put your version here)

Hello,
I'm seeing the problem that at one point in a Google Cloud function environment Typeorm looses the database connection to Postgres "Connection terminated unexpectedly".
That by itselfs is probably not that big of an issue because as I understand it Typeorm automatically reconnects when the connection has been lost. (I confirmed this in local tests where I simply shut down the database server, watching the application recovering on its own)

My problem is that this does not happen in our production environment.
After seeing the "Connection terminated unexpectedly" error the connection continues to fail with the error "Client has encountered a connection error and is not queryable".

Can you point me to some approach to handling this failing connection?
How can I detect this condition and how can I reconnect?
Maybe there's some configuration that is missing?

@GopherJ
Copy link

GopherJ commented Mar 26, 2020

same problem

@stavalfi
Copy link

stavalfi commented Jul 1, 2020

any update?

@AlexSun98
Copy link

same!

@imnotjames
Copy link
Contributor

Pretty sure this is a duplicate of #5112

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

No branches or pull requests

5 participants