Neon Prisma or Drizzle Migration Fails (Pooled Connection)
Workaround available Prisma, Drizzle, Node.js Updated November 14, 2026Based on 3 user reportsHow we research
Quick answer
Run migrations on the direct connection (host without -pooler). Keep the pooled URL for runtime queries only.
Most likely fix: Use a direct URL for migrations
How to fix it
Try these in order — the most common fix is first.
1. Use a direct URL for migrations
- Copy both connection strings from the Connect modal
- Prisma 6 and earlier: set directUrl in schema.prisma to the non-pooler URL
- Prisma 7: set the url in prisma.config.ts to DATABASE_URL_UNPOOLED
- Drizzle: use the non-pooler URL in drizzle.config.ts for drizzle-kit
Did this fix it?2. Add a connect timeout
- Append ?sslmode=require&connect_timeout=15 to the migration URL
Did this fix it?3. Avoid session features on the pooler
- Use SET LOCAL inside a transaction, or schema-qualified table names instead of SET search_path
Did this fix it?
Symptoms
prisma migrate or drizzle-kit hangs or errors, P1001 on migrate, SET search_path ignored, prepared statement or session errors.
Why it happens
- PgBouncer runs in transaction mode: SET, LISTEN/NOTIFY, temp tables and session advisory locks are unreliable
- Migration tool pointed at the -pooler URL
- Compute asleep and connect_timeout too short
This guide also covers
- neon prisma migrate error
- neon drizzle migration pooler
- neon prisma p1001
- neon directUrl
Still not working?
If Neon keeps failing, you're not alone. See every Neon problem users report or the alternatives people switch to.
Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.
Talk to usThe same problem in other apps
Other Neon errors
- Neon Connection Timeout After Scale to Zero (Cold Start)
- Neon "Remaining Connection Slots Are Reserved" (Too Many Connections)
- Neon Compute Time Quota Exceeded (Free Plan Limit Reached)
- Neon Free Plan Storage Limit Reached (Writes Blocked)
- Neon Cannot Create Branch: Branch Limit Reached
- Neon SSL Required Error (Connection Is Insecure)
- Neon "The Endpoint ID Is Not Specified" / Password Authentication Failed
- Neon "Active Endpoints Limit Exceeded" / Compute Suspended