General
Troubleshooting
Database
Learn about database troubles and their solutions.
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 (Virginia): 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!
Database connection errors
If you're seeing connection errors:
- Check that your
DATABASE_URLis correctly set in.env - Verify your database is running and accessible
- Check that your database credentials are correct
- Ensure your IP is whitelisted if using a managed database service
Prisma migration errors
If Prisma migrations fail:
- Make sure your database is accessible
- Check that you have the correct permissions
- Review your Prisma schema for any errors
- Try running migrations (which automatically generates the Prisma client):
npm run db:migrate:dev
Prisma client not found
If you see "Prisma Client not found" errors:
- Run
npm run db:migrate:devto generate the Prisma client and apply migrations - Make sure
prisma/schema.prismaexists and is valid - Restart your development server after generating the client