Our Phoenix application deployed on Fly.io cannot connect to our Supabase
database due to DNS resolution failures, despite the same connection working
perfectly from local machines.
Technical Details:
- App Name: gitperspective-staging
- Region: fra (Frankfurt)
- Database: Supabase PostgreSQL in eu-north-1
- Error: tcp connect (aws-1-eu-north-1.pooler.supabase.com:5432):
non-existing domain - :nxdomain
What Works:
Local connection via psql using same credentials
Local DNS resolution: nslookup aws-1-eu-north-1.pooler.supabase.com
returns valid AWS ELB IPs
Fly.io secrets are set correctly (verified via flyctl secrets list)
What Fails:
Connection from Fly.io infrastructure gets :nxdomain
Even using direct IP addresses (51.21.18.29, 13.60.102.132) fails with
same :nxdomain error
Troubleshooting Attempted:
- Verified DNS resolution works locally
- Tried direct IP addresses instead of domain names
- Confirmed secrets are properly set in Fly.io
- Added app restarts after setting secrets
- Tested multiple Supabase connection formats
Anybody any idea? If not, it was a nice try but after six hours I am sick of such a mess.