2 months ago
Hi everyone,
I’m facing an intermittent DNS / host lookup issue with my backend deployed on Railway.
My mobile app calls the following endpoint:
https://web-production-09df.up.railway.app/api/listener/auth/send-otp
Sometimes the request fails with the following error:
Network error: ClientException with SocketException: Failed host lookup: 'web-production-09df.up.railway.app' (OS Error: No address associated with hostname, errno = 7)
Important observations:
- This does not happen for all users.
- It only affects a few clients.
- For most users, the API works normally.
- I’m not yet sure if it happens only at night, but a few reports suggest it might be occurring during late hours.
Environment:
- Backend hosted on Railway
- Mobile app making HTTPS API calls
- Endpoint:
/api/listener/auth/send-otp
Questions:
- Could this be related to Railway DNS resolution issues?
- Is there any scenario where Railway-generated domains stop resolving intermittently?
- Could this happen if the service sleeps, restarts, or gets redeployed?
- Is there a recommended way to verify if the public domain is intermittently failing DNS resolution?
I’ve attached a screenshot of the error from the mobile app.
Any guidance would be greatly appreciated.
Thanks!
Attachments
2 Replies
2 months ago
hey, this is a known dns issue that affects only some users depending on their isp's dns servers, nothing wrong with your backend itself. certain isp dns servers simply fail to resolve *.up.railway.app domains properly, which is why most users are fine but a few get this error.
the fix is is putting a custom domain behind cloudflare as a reverse proxy. this completely hides the railway subdomain and cloudflare handles dns resolution globally, so users with broken isp dns won't be affected anymore. a cheap domain works fine for this, you can get a .xyz for like $1/year.
2 months ago
Thanks ilyass012 . Will add a custom domain for the same. This is helpful