Can't connect to DB today, was fine yesterday

I'm trying to run a Prisma migration and it's failing today, yet yesterday it worked just fine. Here's the error:
Error: P1001: Can't reach database server at `aws-0-us-east-2.pooler.supabase.com:5432`

Please make sure your database server is running at `aws-0-us-east-2.pooler.supabase.com:5432`.
Error: P1001: Can't reach database server at `aws-0-us-east-2.pooler.supabase.com:5432`

Please make sure your database server is running at `aws-0-us-east-2.pooler.supabase.com:5432`.
I'm also hitting it directly with pg_isready and it seems like it's not available:
❯ /opt/homebrew/opt/libpq/bin/pg_isready --host=aws-0-us-east-2.pooler.supabase.com/postgres --port=5432 --username=postgres.yfjnfqsoqppznpdftkuq
aws-0-us-east-2.pooler.supabase.com/postgres:5432 - no response
❯ /opt/homebrew/opt/libpq/bin/pg_isready --host=aws-0-us-east-2.pooler.supabase.com/postgres --port=5432 --username=postgres.yfjnfqsoqppznpdftkuq
aws-0-us-east-2.pooler.supabase.com/postgres:5432 - no response
Any ideas?
14 Replies
Sleighty
SleightyOP2d ago
Looks like the pooler is down? Yet status.supabase.com doesn't say anything about it
ping aws-0-us-east-2.pooler.supabase.com
PING pool-tcp-us-east-2-56b55e3-a4f2eecd06d9e136.elb.us-east-2.amazonaws.com (13.59.95.192): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
ping aws-0-us-east-2.pooler.supabase.com
PING pool-tcp-us-east-2-56b55e3-a4f2eecd06d9e136.elb.us-east-2.amazonaws.com (13.59.95.192): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
garyaustin
garyaustin2d ago
No one else reporting anything. The status could take awhile to show issues as enough users have to report an issue in mass for Supabase to notice and put up status. Or their internal monitors have to kick off. I'm not sure ping works for supavisor...
Sleighty
SleightyOP2d ago
any idea about workarounds? tried connecting from multiple IPs on my end and currently have the entire company blocked on development due to it
garyaustin
garyaustin2d ago
I get your same result pinging east-1 which my db uses, yet my IDE is connecting with the same string. Are you Pro? It is highly recommend for Pro to use pgbouncer instead of supavisor.
Sleighty
SleightyOP2d ago
not for this project, was waiting to upgrade but could do now
garyaustin
garyaustin2d ago
But If it was down, I would expect issues by now here or github.
Sleighty
SleightyOP2d ago
oh my connection string is trying to use pgbouncer i think?
DATABASE_URL="postgresql://...@aws-0-us-east-2.pooler.supabase.com:6543/postgres?pgbouncer=true&connection_limit=1"
DATABASE_URL="postgresql://...@aws-0-us-east-2.pooler.supabase.com:6543/postgres?pgbouncer=true&connection_limit=1"
garyaustin
garyaustin2d ago
No. That is just a flag to tell prisma to run in a specific mode.
Sleighty
SleightyOP2d ago
got it got it, thanks. super weird, with a postgres client i can connect to my :6543 port and that works fine. but not to the session pooler so we can run migrations direct connection doesn't work either (hostname not found, but might be because i'm on an ipv4 network)
garyaustin
garyaustin2d ago
Direct does have to be ipv6. That is odd about session not and transaction working. Maybe somehow 5432 is being blocked by firewall?
Sleighty
SleightyOP2d ago
changed password a couple times and now it magically works 😐 your comments here were also very helpful, thanks 🙏 https://github.com/orgs/supabase/discussions/33140
garyaustin
garyaustin2d ago
Maybe you were on IP ban for password too many times In the database settings you can see if there is an active ban. Also if you have special characters in the password it can mess up the URL. Or it just started working again... On pro though you want to use pgbouncer and the ipv4 AWS ransom.
Sleighty
SleightyOP2d ago
hmm okay that makes sense. i did have $s in the password before, it was working until today but the first thing i tried was to change it so it didn't have special characters. now the database settings page is failing to retrieve banned IPs so maybe that's a tell haha i'll upgrade to pro, does the pgbouncer option show up in the connection dialog once i do?
garyaustin
garyaustin2d ago
I don't have pro so not sure

Did you find this page helpful?