2 months ago
Hello Railway Team,
My application is unable to connect to my external Supabase database and is consistently failing with the following error: Database connection failed: connect ENETUNREACH 2600:1f1c:f9:4d0f:4da5:5ed2:f4d1:7fb5:5432
Here are the details:
Railway Project:
YT-manage-V4Latest Deployment ID:
d967ebf2(or provide the latest one)Database Host:
db.ychabajmtnknhhmxqqvk.supabase.co
We have already performed extensive troubleshooting and can confirm the following:
Environment variables are correctly loaded by the application.
Supabase firewall is completely open. We have confirmed that rules for
0.0.0.0/0(all IPv4) and::/0(all IPv6) are active in our Supabase project's Network Restrictions.We have tried to force IPv4 connections, both via the start command (
--dns-result-order=ipv4first) and programmatically within the Node.js application (dns.setDefaultResultOrder('ipv4first')). Neither method worked; the application still attempts to connect via IPv6 and fails.
Given that the firewall is open and IPv4-forcing methods have failed, this strongly suggests an issue within the Railway networking environment that is preventing outbound connectivity to our Supabase host.
Could you please investigate this from your end?
Thank you.
4 Replies
2 months ago
Hey there! We've found the following might help you get unblocked faster:
🧵 Rails 8 Database Connection to Supabase Failing with Error
🧵 Frontend Deployment Issues After Supabase Edge Functions Integration - Site Not Loading
If you find the answer from one of these, please let us know by solving the thread!
2 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • 2 months ago
2 months ago
Hey, you are trying to connect to Supabase via their direct connection which is currently not supported as it is IPv6, unless you purchase an additional add on on Supabase to make it also be available on IPv4. Please use one of the pooler connections Supabase provide, as they are IPv4 compatible.
Attachments
2 months ago
Switch your Railway DATABASE_URL to the Supavisor (pooler) connection string.
2 months ago
Hey there! The docs talk about this but outbound ipv6 is not allowed and will fail.
https://docs.railway.com/reference/outbound-networking#outbound-ipv6
Status changed to Solved brody • 2 months ago