Error in PostgreSQL connection: Error { kind: Closed, cause: None }
See original GitHub issueHi Prisma Team! My Prisma Client just crashed. This is the report:
We get batches of these (and have been for many months, maybe once a week), where something will die and then we’ll lose all DB connections for about 25s. At first we thought it was a max number of connections or CPU issue, but we don’t see much evidence of that being the case.
I recognize it’s possible this is a Postgres or Render (our host) issue, but am hoping for some advice on eliminating Prisma’s engine as a cause/general debugging help, since Render has not seen this issue before with their setup.
We’ve tried playing with max connections (currently connection_limit=5
on each of our 2 machines), which hasn’t changed anything.
Versions
Name | Version |
---|---|
Node | v14.11.0 |
OS | debian-openssl-1.1.x |
Prisma Client | 2.17.0 |
Query Engine | query-engine 3c463ebd78b1d21d8fdacdd27899e280cf686223 |
Database | undefined |
Logs
PrismaClientUnknownRequestError2 [PrismaClientUnknownRequestError]: Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Closed, cause: None }) })
at NodeEngine.graphQLToJSError (/opt/render/project/src/node_modules/@prisma/client/runtime/index.js:27156:14)
at NodeEngine.request (/opt/render/project/src/node_modules/@prisma/client/runtime/index.js:27052:24)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async cb (/opt/render/project/src/node_modules/@prisma/client/runtime/index.js:78659:26) {
clientVersion: '2.17.0'
}
}
prisma:engine {
error: PrismaClientUnknownRequestError2 [PrismaClientUnknownRequestError]: Error in connector: Error querying the database: connection closed
at NodeEngine.graphQLToJSError (/opt/render/project/src/node_modules/@prisma/client/runtime/index.js:27156:14)
at NodeEngine.request (/opt/render/project/src/node_modules/@prisma/client/runtime/index.js:27052:24)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async cb (/opt/render/project/src/node_modules/@prisma/client/runtime/index.js:78659:26) {
clientVersion: '2.17.0'
}
}
prisma:engine {
error: PrismaClientUnknownRequestError2 [PrismaClientUnknownRequestError]: Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Closed, cause: None }) })
at NodeEngine.graphQLToJSError (/opt/render/project/src/node_modules/@prisma/client/runtime/index.js:27156:14)
at NodeEngine.request (/opt/render/project/src/node_modules/@prisma/client/runtime/index.js:27052:24)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async cb (/opt/render/project/src/node_modules/@prisma/client/runtime/index.js:78659:26) {
clientVersion: '2.17.0'
}
}
prisma:engine {
error: PrismaClientUnknownRequestError2 [PrismaClientUnknownRequestError]: Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Closed, cause: None }) })
at NodeEngine.graphQLToJSError (/opt/render/project/src/node_modules/@prisma/client/runtime/index.js:27156:14)
at NodeEngine.request (/opt/render/project/src/node_modules/@prisma/client/runtime/index.js:27052:24)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async cb (/opt/render/project/src/node_modules/@prisma/client/runtime/index.js:78659:26) {
clientVersion: '2.17.0'
}
}
prisma:engine {
error: Error: Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Closed, cause: None }) })
at /opt/render/project/src/node_modules/@prisma/client/runtime/index.js:27103:19
at /opt/render/project/src/node_modules/honeycomb-beeline/lib/async_tracker.js:47:19
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
}
prisma:engine {
error: PrismaClientUnknownRequestError2 [PrismaClientUnknownRequestError]: Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Closed, cause: None }) })
at NodeEngine.graphQLToJSError (/opt/render/project/src/node_modules/@prisma/client/runtime/index.js:27156:14)
at NodeEngine.request (/opt/render/project/src/node_modules/@prisma/client/runtime/index.js:27052:24)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
clientVersion: '2.17.0'
}
}
prisma:engine {
error: Error: Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Closed, cause: None }) })
at /opt/render/project/src/node_modules/@prisma/client/runtime/index.js:27103:19
at /opt/render/project/src/node_modules/honeycomb-beeline/lib/async_tracker.js:47:19
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
}
prisma:engine {
error: PrismaClientUnknownRequestError2 [PrismaClientUnknownRequestError]: Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Closed, cause: None }) })
at NodeEngine.graphQLToJSError (/opt/render/project/src/node_modules/@prisma/client/runtime/index.js:27156:14)
at NodeEngine.request (/opt/render/project/src/node_modules/@prisma/client/runtime/index.js:27052:24)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
clientVersion: '2.17.0'
}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Documentation: 9.0: PostgreSQL Error Codes
Error Code Meaning Condition Name
00000 SUCCESSFUL COMPLETION successful_completion
01000 WARNING warning
0100C DYNAMIC RESULT SETS RETURNED dynamic_result_sets_returned
Read more >psql: server closed the connection unexepectedly
It turns out it is because there was a mismatch between the postgre SQL version between my local and the server, installing the...
Read more >Troubleshoot RDS for PostgreSQL error "FATAL - Amazon AWS
I'm getting the error "FATAL: remaining connection slots are reserved for non replicate superuser connections" when I connect to my Amazon ...
Read more >Error message reference - Prisma
Prisma Client throws a PrismaClientInitializationError exception if something goes wrong when the query engine is started and the connection to the database is ......
Read more >Services backed by PostgreSQL fail or stop responding
The logs show a “ FATAL: remaining connection slots are reserved for non-replication superuser connections ” error. The number of connections between the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m usually a little behind latest release because we have to wait for nexus-plugin-prisma to update. Will upgrade when I can.
We have had issues in the past (6+mo ago) with Prisma being the first thing to fail with unintuitive errors when our machine got resource constrained, and we did just discover that
graphql-shield
has been causing a ton of memory allocation and slowness (we ship down fairly large GQL objects), so it is possible that fixing that will cause these issues to improve.Happy to reopen if/when this happens down the line, or leave this for tracking: whatever you’d prefer.
Information about the PR that closed this: https://github.com/prisma/prisma/issues/6329#issuecomment-815012006
Feel free to reply here again if the problem is not solved/better for you and we can reopen the issue of course.