prisma: DB errors when using Prisma2 with pgBouncer connection pools
I am trying out pgBouncer connection pools (transaction mode) on managed Postgresql on DigitalOcean.
I am getting errors similar to:
[GraphQL error]: Message: Error in Photonselect,user:
Error: Reason: Error in connector: Error querying the database: db error: ERROR: prepared statement "s667" already exists
This occurs only with connection pooling, not with direct db connections.
The errors occur under the following conditions:
- with versions
prisma2@2.0.0-preview-11
as well as latest alpha - with deployments of the GraphQL server both on zeit-now and locally
- with Prisma2 starter project (GraphQL starter), when running
yarn seed
Easiest way to reproduce:
- set up a managed postgresql db on DigitalOcean
- prisma2 init simple typescript GraphQL starter
- run
yarn seed
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 26 (14 by maintainers)
@Linktheoriginal PgBouncer support was added to the engine via https://github.com/prisma/prisma-engines/pull/403
We are working on exposing it via the client: https://github.com/prisma/specs/issues/386
So please wait while we are working on this.
pgBouncer support is now part of Prisma and can be used. Until this is added to the official documentation, you can read about it on https://github.com/prisma/prisma-client-js/issues/503 🚀
@matthewmueller, it wasn’t intentional! must have hit a keyboard shortcut accidentally?
@pantharshit00, migration fails for me, if I am using underscores in the schema name, e.g.
issue_556
fails whereasissue556
works.