Intermittent DNS Resolution Failures for Supabase Hostname During Runtime
ricksalvatore422
FREEOP

2 months ago

Open a Railway support ticket with:

      - The new stack trace (the one you just shared).

      - The hostname ejudbfrrzszehlhrprph.supabase.co.

      - Proof that railway run nslookup and railway run curl -I succeed from the same project.

      - Note that Twilio webhooks hit the service, but every Supabase SDK call fails immediately with socket.gaierror.Our Python app experiences consistent DNS resolution failures when Supabase SDK queries during webhook handling, despite DNS working via Railway CLI.

Environment:

Problem: Every query fails with httpx.ConnectError: [Errno -2] Name or service not known

Evidence DNS works:

railway run nslookup ejudbfrrzszehlhrprph.supabase.co → Returns 104.18.38.10, 172.64.149.246

railway run curl -I https://ejudbfrrzszehlhrprph.supabase.co → Returns HTTP/2 404

Pattern:

App startup: Supabase client creates successfully

Railway CLI: DNS works

Runtime webhooks: All SDK queries fail

Call stack: Supabase SDK → httpx → httpcore → DNS resolution fails

Impact: All inbound SMS webhooks fail database lookups despite HTTP 200 response.

Question: Why does DNS fail during Python runtime but work via Railway CLI?

$10 Bounty

2 Replies


brody
EMPLOYEE

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


ricksalvatore422
FREEOP

2 months ago

Update: I tried changing the service region from US East (us-east4) to US West (us-west2) as suggested in similar support threads, but the DNS resolution issue persists.

The service successfully deployed to us-west2, but test SMS messages still fail with the same error:

httpx.ConnectError: [Errno -2] Name or service not known
```

The pattern remains consistent:
- ✅ App startup: Supabase client initializes successfully
- ✅ Railway CLI: `railway run nslookup` and `railway run curl` both work
- ❌ Runtime webhooks: All Supabase SDK calls fail with DNS errors

This suggests the issue may not be region-specific but potentially something else with how DNS is resolved during Python runtime in Railway's environment.

Loading...