andywer/pg-listen

Client has encountered a connection error and is not queryable

maxpain opened this issue · 4 comments

image

By some reason pg-listen doesn't reconnect in some cases.

Thanks for sharing!

Hmm, might be an issue with pg itself, though. It's a bit nasty to debug and we would first need to find out if the unhandled promise rejection is caused by pg-listen or pg.

Can you share the exact version of pg that you are using, @maxpain?

Can you share the exact version of pg that you are using, @maxpain?

8.7.1

I also noticed that this is happening when PostgreSQL instance restarts.

This is log from our staging environment:
image

Any updates?

I fixed this problem by setting retryTimeout: Number.POSITIVE_INFINITY in pg-listen options.
Why is it 3000 by default?