Replies: 4 comments
|
Nine times out of ten this is the IPv6 thing. Supabase's direct connection ( Switch your Then in If special chars in the password are URL-encoded and it still fails, hit the same string with |
|
P1001 with Supabase + Prisma is one of the most misleading errors in the ecosystem — the message implies a network problem, but the real cause is almost always something else. Since you've already tried the basics, here's the full layered diagnostic. Work through these in order. 1. You're using the wrong connection string for the wrong purposeThis is the #1 cause by a wide margin. Supabase gives you two strings and they are not interchangeable:
Your # Pooled — runtime queries
DATABASE_URL="postgresql://postgres.[ref]:[PASSWORD]@aws-0-[region].pooler.supabase.com:6543/postgres?pgbouncer=true&connect_timeout=30"
# Direct — migrations only
DIRECT_URL="postgresql://postgres:[PASSWORD]@db.[ref].supabase.co:5432/postgres?connect_timeout=30"And your datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DIRECT_URL")
}
2. Special characters in your password silently break the URLIf your password contains any of Fix: Go to Supabase Dashboard → Project Settings → Database → Reset database password. Use only alphanumeric characters (no symbols). Then rebuild your Alternatively percent-encode it ( 3. Your Supabase project is paused (free tier)Free-tier projects are automatically paused after 1 week of inactivity. A paused project returns P1001 because the DB isn't running at all. Check: Open your Supabase dashboard — if you see a "Project paused" banner, click Restore and wait 2–3 minutes before retrying. 4. Missing
|
|
Is the issue resolved now or are you still running into this? |
|
Hi, As we have not heard back from you, we are closing this discussion to keep our discussions organized. Feel free to start a new discussion if this remains relevant. Thank you for being part of the community! |
Uh oh!
There was an error while loading. Please reload this page.
Question
I'm losing my mind over this error, I tried everything, it started as Supabase P1001, I restarted db, I changed passwords, I checked env strings.... Nothing works!
How to reproduce (optional)
Expected behavior (optional)
No response
Information about Prisma Schema, Client Queries and Environment (optional)
// Add your schema.prisma// Add any relevant Prisma Client queries hereOS:
Database:
Node.js version:
Run
prisma -vto see your Prisma version and paste itAll reactions