hi everyone,
I constantly get this error:
node_modules/pg-protocol/src/parser.ts:369
name === 'notice' ? new NoticeMessage(length, messageValue) : new DatabaseError(messageValue, length, name)
^
error: terminating connection due to administrator command
I am using postgres , and I have to restart the server every time, any idea why this is happening?
I haven't encountered this personally, what are the steps to reproduce? What's your payload version?
I am using
"payload": "2.6.0",and also
https://neon.tech/for the postgres
constantly crashes
node_modules/pg-protocol/src/parser.ts:369
name === 'notice' ? new NoticeMessage(length, messageValue) : new DatabaseError(messageValue, length, name)
^
error: terminating connection due to administrator command
at Parser.parseErrorMessage (node_modules/pg-protocol/src/parser.ts:369:69)
at Parser.handlePacket (node_modules/pg-protocol/src/parser.ts:188:21)
at Parser.parse (node_modules/pg-protocol/src/parser.ts:103:30)
at TLSSocket.<anonymous> (node_modules/pg-protocol/src/index.ts:7:48)
at TLSSocket.emit (node:events:514:28)
at TLSSocket.emit (node:domain:489:12)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at TLSSocket.Readable.push (node:internal/streams/readable:234:10)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23) {
length: 116,
severity: 'FATAL',
code: '57P01',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'postgres.c',
line: '3261',
routine: 'ProcessInterrupts'
}
[nodemon] app crashed - waiting for file changes before starting...any help with this one?I want to use postgres as it will make it much easier for me to update the data manually
but site constantly fails with this error
Can you provide any more information from your instance? I've seen this error before when there were connectivity issues
do you think it is related to
https://neon.tech/? I followed the docs for migrating mongodb to postgres, it was pretty simple
Well, it's possible
According to neon,
The terminating connection due to administrator command error is typically encountered when running a query from a connection that has sat idle long enough for the compute endpoint to suspend due to inactivity. Neon automatically suspends a compute endpoint after 5 minutes of inactivity, by default.So it could be that you made a request that issues a query on an idle connection?
I'd have to look more into it, though I think
@858693520012476436would find this interesting
Yeah we've seen this, it will happen with Vercel as well who uses neon.tech under the hood, we don't currently have a way of managing this connection being terminated
is there any other recommendation services for cloud postgres?
We want to fix this for sure, in the meantime supabase or digitalocean are good options for managed databases
We have also run into this issue after switching from Supabase to Neon, as Neon has stable support for branching and integrates well with Vercel.
Has there been made any advances on handling the issue with Payload crashing due to automatic compute suspension? I guess in the meantime as a temporary fix we could set up a scheduled task to ping neon periodically by hitting a payload Collection endpoint.
If there is not fix yet, do you think the automatic suspension will crash the future release of Payload running on Nextjs runtime?
would know better on the status of this issue
I didn't see this community help issue until now. This is a perfect thing to open a GitHub issue for. We can address this by trying to reconnect automatically. I can work on this.
@944284724824801302can you please open an issue on GitHub for us to track this?
having this same problem.
@969226489549713438I made an issue here as it appears there wasn't one:
https://github.com/payloadcms/payload/issues/5075hey hey, thanks for the work i saw a fix was merged. is this good to go?
https://github.com/payloadcms/payload/pull/5086i updated my payload to
"payload": "^2.11.1"but i'm still getting the same disconnect
[23:27:37] INFO (payload): Payload Admin URL: /admin
node:events:491
throw er; // Unhandled 'error' event
^
error: terminating connection due to administrator command
at Parser.parseErrorMessage (/home/node/app/node_modules/pg-protocol/dist/parser.js:287:98)
at Parser.handlePacket (/home/node/app/node_modules/pg-protocol/dist/parser.js:126:29)
at Parser.parse (/home/node/app/node_modules/pg-protocol/dist/parser.js:39:38)
at TLSSocket.<anonymous> (/home/node/app/node_modules/pg-protocol/dist/index.js:11:42)
at TLSSocket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Readable.push (node:internal/streams/readable:234:10)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)
Emitted 'error' event on Client instance at:
at Client._handleErrorEvent (/home/node/app/node_modules/pg/lib/client.js:341:10)
at Client._handleErrorMessage (/home/node/app/node_modules/pg/lib/client.js:352:12)
at Connection.emit (node:events:513:28)
at /home/node/app/node_modules/pg/lib/connection.js:117:12
at Parser.parse (/home/node/app/node_modules/pg-protocol/dist/parser.js:40:17)
at TLSSocket.<anonymous> (/home/node/app/node_modules/pg-protocol/dist/index.js:11:42)
[... lines matching original stack trace ...]
at Readable.push (node:internal/streams/readable:234:10) {
length: 116,
severity: 'FATAL',
code: '57P01',
// ...
Node.js v18.8.0wonder what im missin. the neon.tech db is all default on main branch
did you update the postgres package as well?
it needs to be updated separately
these fixes would only be in there
ah of course, did that and it works perfectly. thanks
Star
Discord
online
Get dedicated engineering support directly from the Payload team.