Skip to content

Connection terminated unexpectedly. #3

Description

@chainhead

I am getting this error unpredictably in pm2 logs for Node-RED.

26 Jun 09:22:37 - [error] [postgres:DBQuery] Error: Connection terminated unexpectedly

I did some searches and found this:

What's happening now is one (or many) client(s) in your pool sits idle and connected to the backend database. A network partition happens or database failure, fail-over, forced disconnection from the backend, etc and the idle client(s) all notice and emit an error event. The pool listens for errors on idle clients. When an idle client has an error the pool destroys the client and removes it from the pool so the next time you request a client from the pool it will automatically create and connect a new client.

Should a pool.on('error', (err) { ... } be inserted after this?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions