Extremely slow first request latency (~11 seconds) - Pro Plan
yuno-code
PROOP

2 months ago

Experiencing 11+ second response times on a simple health endpoint from external monitoring (UptimeRobot), while same endpoint responds in 81ms from my own machine.

  • Pro plan, US East region

  • Health endpoint: just returns JSON, no DB calls

  • UptimeRobot: consistently 11,600ms

  • My machine: 81ms

  • Container is warm (pinging every 5 min)

  • Pattern affects real users - first app open is slow, refresh is instant

  • Issue started recently

Appears to be proxy/routing layer issue, not application code.

$20 Bounty

6 Replies

darseen
HOBBYTop 5% Contributor

2 months ago

If you're using *.up.railway.app default domain, ISPs sometimes deprioritize or flag traffic to shared generic domains like railway.app, herokuapp.com, or onrender.com . You need to use a custom domain to get this resolved in this case.

This issue happend to a user before, and he said they got it resolved by using a custom domain. Check the issue here.


darseen

If you're using *.up.railway.app default domain, ISPs sometimes deprioritize or flag traffic to shared generic domains like railway.app, herokuapp.com, or onrender.com . You need to use a custom domain to get this resolved in this case.This issue happend to a user before, and he said they got it resolved by using a custom domain. Check the issue here.

yuno-code
PROOP

2 months ago

I'm already using a custom domain, not the default Railway domain.

The issue doesn't seem to be my application - once requests actually reach my app, they complete in 0-60ms (verified via application logs with timing wrappers on all endpoints).

The 11+ second delay is happening before requests reach my application. This is likely a proxy/routing issue, not ISP throttling.

  • Same health endpoint: 81ms from my machine, 11,600ms from UptimeRobot

  • My app logs show requests completing in milliseconds once they arrive

  • First request from external IPs = slow, subsequent requests = fast

  • Container is warm (pinging every 5 min), not a cold start issue


darseen
HOBBYTop 5% Contributor

2 months ago

The fact that you mentioned "UptimeRobot: consistently 11,600ms" makes me think that this is a timeout issue because it's a specific and constant delay.
The most likely cause is an IPv6 vs IPv4 Binding Mismatch.
If that's the case, UptimeRobot attempts to connect via IPv6. Your application container is likely binding explicitly to 0.0.0.0 (IPv4 only), causing hangs because the app isn't listening on that protocol. After a default timeout (maybe 10 seconds), the connection gives up on IPv6, and fallsback to IPv4. In this case you need to change Application Binding to :: . You can tell me more about your services setup, so I can help you with binding to IPv6.

If this is not the cause, at least we rule it out.


darseen

The fact that you mentioned "UptimeRobot: consistently 11,600ms" makes me think that this is a timeout issue because it's a specific and constant delay.The most likely cause is an IPv6 vs IPv4 Binding Mismatch. If that's the case, UptimeRobot attempts to connect via IPv6. Your application container is likely binding explicitly to 0.0.0.0 (IPv4 only), causing hangs because the app isn't listening on that protocol. After a default timeout (maybe 10 seconds), the connection gives up on IPv6, and fallsback to IPv4. In this case you need to change Application Binding to :: . You can tell me more about your services setup, so I can help you with binding to IPv6.If this is not the cause, at least we rule it out.

yuno-code
PROOP

2 months ago

Curious, my app talks to railways proxy, not directly to the internet, also the mobile app users are experiencing this not just uptimerobot.

I found a similar thread for users with cloudflare proxy, where an issue was routing through asia for some reason, im testing that now by disabling it on my end, hope to see some progress there.

The thread: https://station.railway.com/questions/server-latency-and-slow-response-times-991479b8


yuno-code
PROOP

2 months ago

I disabled Cloudflare proxy (switched to DNS only) and response times dropped from 11,600ms to 70ms immediately.

This is the same bug reported here that was marked fixed on Jan 15: https://station.railway.com/questions/server-latency-and-slow-response-times-991479b8

Maybe the issue is intermittent? for the last 20 minutes or so things have been fine even with proxy on.


yuno-code
PROOP

2 months ago

Issue is back as of this morning. Seems toggling cloudflare proxy off and back on resolves it, however it's only affecting my railway services. Are there not any other users reporting this? Any ideas?


Loading...