I encounter this error for some reason related to pgbouncer

Whats the explanation for this ?

I’m also getting this error now but in production. My serverless function on Vercel is failing with this error. It was working fine for months and now all of a sudden it’s not.

[next-auth][error][adapter_error_getUserByEmail]
Errors | NextAuth.js
Invalid prisma.user.findUnique() invocation:

Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(PostgresError { code: “26000”, message: “prepared statement "PGBOUNCER_3" does not exist”, severity: “ERROR”, detail: None, column: None, hint: None }), transient: false }) {
message: ‘\n’ +
‘Invalid prisma.user.findUnique() invocation:\n’ +
‘\n’ +
‘\n’ +
‘Error occurred during query execution:\n’ +
‘ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(PostgresError { code: “26000”, message: “prepared statement \“PGBOUNCER_3\” does not exist”, severity: “ERROR”, detail: None, column: None, hint: None }), transient: false })’,
stack: ‘PrismaClientUnknownRequestError: \n’ +
‘Invalid prisma.user.findUnique() invocation:\n’ +
‘\n’ +
‘\n’ +
‘Error occurred during query execution:\n’ +
‘ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(PostgresError { code: “26000”, message: “prepared statement \“PGBOUNCER_3\” does not exist”, severity: “ERROR”, detail: None, column: None, hint: None }), transient: false })\n’ +
’ at Cn.handleRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:123:6989)\n’ +
’ at Cn.handleAndLogRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:123:6206)\n’ +
’ at Cn.request (/var/task/node_modules/@prisma/client/runtime/library.js:123:5926)\n’ +
’ at async l (/var/task/node_modules/@prisma/client/runtime/library.js:128:9968)',
name: ‘PrismaClientUnknownRequestError’
}
⨯ PrismaClientUnknownRequestError:
Invalid prisma.user.findUnique() invocation:

Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(PostgresError { code: “26000”, message: “prepared statement "PGBOUNCER_3" does not exist”, severity: “ERROR”, detail: None, column: None, hint: None }), transient: false })
at Cn.handleRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:123:6989)
at Cn.handleAndLogRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:123:6206)
at Cn.request (/var/task/node_modules/@prisma/client/runtime/library.js:123:5926)
at async l (/var/task/node_modules/@prisma/client/runtime/library.js:128:9968) {
name: ‘GetUserByEmailError’,
code: undefined
}

I’m also having the same problem! We need this to be resolved urgently

Thank you for reports, not yet sure what is going on – looking into it.

What client do you use?

Okay, I think we identified the root cause. Working on that.

We’ve started the incident: Issues with connections to pooled endpoints - neon Status and rolling back latest pgboucer release. That should fix the issue. @ibrahimyaacob92 @Ramzi_Bach @lservo can you please share what client are you using?

What do you mean by client?

I meant software that you are using to send queries. Actually looking closely at the backtraces I see that it is Prisma.

It is indeed Prisma.

I don’t know if everything is fixed, but as far as I can tell, for me at least, everything seems to be back to normal. Thank you!

1 Like

this just drive me nuts for a while, i just decided to delete the entire project and built a new one. Hopefully things like this would not happen again.