Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supabase w/ Prisma ORM & Drizzle sometimes fails with 500 errors #46

Open
nikolasburk opened this issue May 3, 2024 · 2 comments
Open

Comments

@nikolasburk
Copy link
Contributor

nikolasburk commented May 3, 2024

The Supabase-based tests using Prisma ORM and Drizzle sometimes seem to fail with a 500 error.

The corresponding API route are api/supabase-prisma-node and api/supabase-drizzle-node.

When it breaks, this is the output in the browser console:

image

In these cases, the rendered chart areas stay empty.

@leerob would you be able to take a look at the logs for the above routes and see if there are any errors related to the Supabase DB or some other thing?

@leerob
Copy link
Contributor

leerob commented May 9, 2024

⨯ PrismaClientUnknownRequestError: 
Invalid `prisma.employees.findMany()` invocation:
Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(PostgresError { code: "42P05", message: "prepared statement \"s0\" already exists", severity: "ERROR", detail: None, column: None, hint: None }), transient: false })
at In.handl

@nikolasburk
Copy link
Contributor Author

This may be related to Supabase's usage of pgBouncer.

@leerob can you append pgbouncer=true as a URL argument to the SUPABASE_DATABASE_URL?

For example:

More context in this issue: prisma/prisma#11643

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants