Error: pgbouncer cannot connect to server

We have connection to our postgres database.
But sometimes the postgres node thorows following error
error: pgbouncer cannot connect to server

error: pgbouncer cannot connect to server
    at Parser.parseErrorMessage (/usr/local/lib/node_modules/n8n/node_modules/pg-protocol/dist/parser.js:287:98)
    at Parser.handlePacket (/usr/local/lib/node_modules/n8n/node_modules/pg-protocol/dist/parser.js:126:29)
    at Parser.parse (/usr/local/lib/node_modules/n8n/node_modules/pg-protocol/dist/parser.js:39:38)
    at Socket.<anonymous> (/usr/local/lib/node_modules/n8n/node_modules/pg-protocol/dist/index.js:11:42)
    at Socket.emit (node:events:513:28)
    at Socket.emit (node:domain:489:12)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
    at TCP.callbackTrampoline (node:internal/async_hooks:130:17)

How can we resolve this ?

Hey @Paddy_Pohare,

Is there anymore error output or is that it?

No more error output, got this much only from workflow.

Hey @Paddy_Pohare,

Does it work if you don’t use pgbouncer? The error almost looks like pgbouncer is saying it can’t connect to the server. I would start by removing pgbouncer and going directly or check the logs in pgbouncer to see if that shows anything else.