a month ago
Hello,
We have a next.js service and Postgres database deployed. We've recently encountered an issue where the service is unable to communicate with the Postgres database via private networking. Everything works fine in our staging environment. I have tried restarting/redeploying both the service and the database. Would really appreciate some assistance here.
Example log:
[14:48:35] ERROR: Error: cannot connect to Postgres. Details: connect ETIMEDOUT fd12:d5fa:f09c:0:a000:10:3718:c169:5432
err: {
"type": "Error",
"message": "connect ETIMEDOUT fd12:d5fa:f09c:0:a000:10:3718:c169:5432",
"stack":
Error: connect ETIMEDOUT fd12:d5fa:f09c:0:a000:10:3718:c169:5432
at /app/node_modules/.pnpm/pg-pool@3.10.1_pg@8.16.3/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async connectWithReconnect (/app/node_modules/.pnpm/@payloadcms+db-postgres@3.76.1_@opentelemetry+api@1.9.0_@prisma+client@6.18.0_prisma@6._8b39f4679c04b6e345e48b5494e732a9/node_modules/@payloadcms/db-postgres/src/connect.ts:22:14)
at async Object.connect (/app/node_modules/.pnpm/@payloadcms+db-postgres@3.76.1_@opentelemetry+api@1.9.0_@prisma+client@6.18.0_prisma@6._8b39f4679c04b6e345e48b5494e732a9/node_modules/@payloadcms/db-postgres/src/connect.ts:58:7)
at async BasePayload.init (/app/node_modules/.pnpm/payload@3.76.1_graphql@16.11.0_typescript@5.9.2/node_modules/payload/src/index.ts:871:7)
at async migrate (/app/node_modules/.pnpm/payload@3.76.1_graphql@16.11.0_typescript@5.9.2/node_modules/payload/src/bin/migrate.ts:70:3)
at async runBinScript (/app/node_modules/.pnpm/payload@3.76.1_graphql@16.11.0_typescript@5.9.2/node_modules/payload/dist/bin/index.js:110:9)
at async bin (/app/node_modules/.pnpm/payload@3.76.1_graphql@16.11.0_typescript@5.9.2/node_modules/payload/dist/bin/index.js:44:29)
at async start (file:///app/node_modules/.pnpm/payload@3.76.1_graphql@16.11.0_typescript@5.9.2/node_modules/payload/bin.js:30:7)
"errno": -110,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "fd12:d5fa:f09c:0:a000:10:3718:c169",
"port": 5432
}
node:internal/process/promises:389
new UnhandledPromiseRejection(reason);
^
UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined".
at throwUnhandledRejectionsMode (node:internal/process/promises:389:7)
at processPromiseRejections (node:internal/process/promises:470:17)
at process.processTicksAndRejections (node:internal/process/task_queues:96:32) {
code: 'ERR_UNHANDLED_REJECTION'
}
4 Replies
a month ago
I am able to connect using the public url, but obviously I'd prefer to use the private one.
a month ago
Okay, after switching to the database's public URL and then back to the private URL, the issue seems to have gone away. Spent more of my morning on this than I would have liked. Anecdotally, it feels like there are more and more bugs in the platform recently. It makes me sad (and considering switching to another provider).
a month ago
Also having simllar postgres issues for the past 6 hours
a month ago
Hello. We've identified the issue as a failing optic in our physical infrastructure stack. We've disabled that pathway and this should be resolved. Can you please confirm?
Status changed to Awaiting User Response Railway • 26 days ago
Status changed to Solved brody • 24 days ago