Intermittent “Failed host lookup” error for Railway app domain (only affecting some users)
nidhikharnokhya
HOBBYOP

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:

  1. Could this be related to Railway DNS resolution issues?
  2. Is there any scenario where Railway-generated domains stop resolving intermittently?
  3. Could this happen if the service sleeps, restarts, or gets redeployed?
  4. 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

$10 Bounty

2 Replies

ilyass012
FREE

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.


nidhikharnokhya
HOBBYOP

2 months ago

Thanks ilyass012 . Will add a custom domain for the same. This is helpful


Welcome!

Sign in to your Railway account to join the conversation.

Loading...