prisma Error: p1001: Can't reach database server at `xyz`

I'm trying to connect prisma and supabase in my nextjs project but it is giving me the following error. Here's what I have tried till now: 1) The error is not related to password as it contains only strings 2) I've tried increasing connect_timeout to 30 seconds, still encountering the same error 3) Used non pooled supabase URL, still no progress 4) Used Neon DB and encountering the same issue 5) Tried changing my network, I was using hostel LAN and switched to personal mobile hotspot 6) I have tried turning off all the firewalls on my laptop 7) Checked both supabase's and neon's setting to see if my IP is blocked but it's not. They're showing that all IP's are allowed. Please fix this error ASAP as it's really important to me. I have deadlines to meet.
6 Replies
RaphaelEtim
RaphaelEtim2mo ago
Hi @Anurag Mani Tripathi Can you please share your schema file and the connection strings you are using. Please obfuscate the username and password before sharing. Also, can you confirm that you can connect to the database using a Database management tool like Tableplus or Dbeaver
Anurag Mani Tripathi
Yes I can.
RaphaelEtim
RaphaelEtim2mo ago
is your connection string in this format?
# Connect to Supabase via connection pooling with Supavisor.
DATABASE_URL="postgresql://postgres.dnnhtbehpfyusttyytfw:[YOUR-PASSWORD]@aws-0-ap-south-1.pooler.supabase.com:6543/postgres?pgbouncer=true"

# Direct connection to the database. Used for migrations.
DIRECT_URL="postgresql://postgres.dnnhtbehpfyusttyytfw:[YOUR-PASSWORD]@aws-0-ap-south-1.pooler.supabase.com:5432/postgres"
# Connect to Supabase via connection pooling with Supavisor.
DATABASE_URL="postgresql://postgres.dnnhtbehpfyusttyytfw:[YOUR-PASSWORD]@aws-0-ap-south-1.pooler.supabase.com:6543/postgres?pgbouncer=true"

# Direct connection to the database. Used for migrations.
DIRECT_URL="postgresql://postgres.dnnhtbehpfyusttyytfw:[YOUR-PASSWORD]@aws-0-ap-south-1.pooler.supabase.com:5432/postgres"
Anurag Mani Tripathi
Yes.
RaphaelEtim
RaphaelEtim2mo ago
Notice i'm not specifying any connection_limit or connect_timeout. Can you please share the full error message
Want results from more Discord servers?
Add your server