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:

  1. Check that your DATABASE_URL is correctly set in .env
  2. Verify your database is running and accessible
  3. Check that your database credentials are correct
  4. Ensure your IP is whitelisted if using a managed database service

Migration errors

If migrations fail:

  1. Make sure your database is accessible
  2. Check that you have the correct permissions
  3. Review the migration files for any syntax errors
  4. Try running migrations manually: npm run db:migrate