P1001: Can't reach database server
- Prisma
- Supabase
- Vercel
What it means
Your app could not open a connection to the database at all. With Supabase, the direct connection address often is not reachable from hosting platforms; the pooler address is.
Why it happens
- The direct database address (db.<project>.supabase.co) is used from a host that cannot reach it.
- Wrong host, port or password in the connection string.
- The project is paused.
How to fix it
- Use the connection pooler string from your Supabase project's connect settings for the app.
- Keep a separate direct or session-mode string for migrations if your tool needs one.
- Check the project is running, and test the connection string from your host's environment.
Let your AI find the cause
Paste this into Claude Code, Cursor, Lovable or whichever AI built your app. It looks first and changes nothing until you have read the answer.
My app fails with Prisma P1001 'Can't reach database server'. Without changing anything yet, show me which connection strings this project uses for the app and for migrations, which host and port each points at, and whether they go through a pooler.