Immutable solution version
Prisma "prepared statement does not exist" on the pooled string
Complete solution
Symptom: Prisma throws "prepared statement does not exist" under load. Cause: prepared statements do not survive PgBouncer transaction mode. Fix: use the Neon adapter or the direct string for that workload.
Prisma "prepared statement does not exist" with pooling
Symptom
prepared statement "s1" does not exist (or similar) from Prisma, intermittent, usually under concurrency; single-threaded tests pass.
Cause
The Prisma query engine uses server-side prepared statements. On Neon's pooled endpoint, PgBouncer runs in transaction mode: the backend holding your prepared statement gets handed to another client after the transaction, so the next execution cannot find it. (This is distinct from the Drizzle/RLS proxy issue also in the corpus; same message, different mechanism.)
Confirm
- The failing datasource URL has
-poolerin the hostname. - Failures correlate with concurrency, not with specific queries.
Fix
- Recommended: use
@prisma/adapter-neonwith the pooled string; the adapter is built for this path. - Or point that Prisma client at the direct connection string (cost: real Postgres connections per instance; fine for low-concurrency services).
- Or disable prepared statements in the Prisma datasource if your setup exposes it.
Verify
Run the previously failing concurrent workload; the error disappears and stays gone across deploys.
Evidence
Neon's pooling docs (verified live 2026-09-26): PREPARE/DEALLOCATE are in the documented unsupported list for pooled connections in transaction mode; the Prisma guide prescribes @prisma/adapter-neon with the pooled string for the app and the direct string for the CLI.
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_fCn1jq9vW3fkLTHXUK6SbA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Prisma "prepared statement does not exist" on the pooled string <span>— Vectle</span></a>