Supabase/Prisma DB Issues
Hi all,
We've noticed a few different issues with our postgres instance via Prisma (hosted in Supabase). We're having a hard-time identifying what's missing in order to fix these errors. Ideally, something is misconfigured / with your help, we can fix these issues. Database health wise, utilization on average seems healthy (but has spiked some days). We use Primsa as our ORM / many of these errors are in Prisma-speak
Here are some of the errors we've seen:
- Error in connector: error querying the database: unexpected message from server
- Can't reach database server at ...
- Timed out fetching a new connection from the connection pool. More info: http://pris.ly/d/connection-pool (Current connection pool timeout: 30, connection limit: 1)
- Transaction API error: Transaction already closed: A batch query cannot be executed on an expired transaction. The timeout for this transaction was 5000 ms, however 6357 ms passed since the start...
- Server has closed the connection.
- X does not exist -> this one has many forms, sometimes tables/relations
It's possible that some of these errors are unrelated - but in general it's caused a lot of flakiness / we'd like a more reliable database.
Things we're looking into:
- Increasing the connection_limit from 1 to 5 in our DB_URL (postgres://postgres.<project_id>:***@aws-0-us-east-1.pooler.supabase.com:6543/postgres?pgbouncer=true&connection_limit=1&pool_timeout=30)
Beyond this, we're unsure what we need to do to get our database healthy again.
We've noticed a few different issues with our postgres instance via Prisma (hosted in Supabase). We're having a hard-time identifying what's missing in order to fix these errors. Ideally, something is misconfigured / with your help, we can fix these issues. Database health wise, utilization on average seems healthy (but has spiked some days). We use Primsa as our ORM / many of these errors are in Prisma-speak
Here are some of the errors we've seen:
- Error in connector: error querying the database: unexpected message from server
- Can't reach database server at ...
- Timed out fetching a new connection from the connection pool. More info: http://pris.ly/d/connection-pool (Current connection pool timeout: 30, connection limit: 1)
- Transaction API error: Transaction already closed: A batch query cannot be executed on an expired transaction. The timeout for this transaction was 5000 ms, however 6357 ms passed since the start...
- Server has closed the connection.
- X does not exist -> this one has many forms, sometimes tables/relations
relation "Product" does not exist, sometimes extensions type "hstore" does not exist". In each case we've seen, the extension/relation does in fact exist/wasn't modifiedIt's possible that some of these errors are unrelated - but in general it's caused a lot of flakiness / we'd like a more reliable database.
Things we're looking into:
- Increasing the connection_limit from 1 to 5 in our DB_URL (postgres://postgres.<project_id>:***@aws-0-us-east-1.pooler.supabase.com:6543/postgres?pgbouncer=true&connection_limit=1&pool_timeout=30)
Beyond this, we're unsure what we need to do to get our database healthy again.
Prisma ORM's query engine creates a connection pool to store and manage database connections.
