Docs
Troubleshooting

Database

Learn about database troubles and their solutions.

I'm using Supabase and the migration doesn't work

That's because the connectio string Supabase is giving you is using pbBouncer with a transaction or session pooling. You need to bypass the pooling for migrations. Basically adding a second environment variable DIRECT_URL as described in the Prisma documentation.

I'm using Supabase and the application is slow in production

Make sure your application and database are physically close. If you use Vercel and Supabase make sure they are in the same AWS region. For example

  • Vercel (D.C.) and Supabase (Virgina): Both are in us-east-1 - the application is fast.
  • Vercel (D.C.) and Supabase (Ohio): You are dealing with two different AWS regions, the app is up to x12 slower!