10 months ago
I just upgraded to the PRO, since the hobby seems slow as frozen snot. Now the server just hangs and doesn't resolve. It will sit for several 5 MINUTES even before actually getting through. This is stupid.
I can see some bots accessing via the logs, the deployment is fine. What gives? I'm two hairs from canceling this and going somewhere else.
1 Reply
10 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 Railway • 10 months ago
4 hours ago
Hi @matt1260 — if this is still happening, the first thing I’d check is which request spends those five minutes waiting. A bot reaching one URL tells us the service answered that request. Your browser may be waiting on a different hostname, an authenticated page, or an API call the bot never makes. The timing of the Pro upgrade alone doesn’t distinguish those cases.
1. Capture one slow load from the connection where you see it. In Chrome or Edge, open DevTools → Network, turn on Preserve log, and reload once. Start with the first row whose type is “document.” If it redirects, follow the next document row. Click the slow row and open Timing.
- If DNS Lookup, Initial connection, or SSL accounts for most of the wait, record the hostname and the phase. Try the same URL once over a phone hotspot with Wi-Fi off. If only one network stalls before HTTP, that gives support a specific path to investigate.
- If the document returns quickly but a Fetch/XHR request sits pending, use that request’s path for the remaining checks. A fast homepage can coexist with a five-minute API call.
- If the delay is under Waiting for server response, the browser has resolved the hostname and sent the request. That wait can include a CDN, proxy, or backend dependency.
2. Match that request to Railway. Record its start time in UTC, method, path, HTTP status or exact browser error, and the X-Railway-Request-Id response header if present. In the affected service’s HTTP Logs, search @requestId:<id>. Without an ID, use the UTC window and path. Look after the attempt finishes and include errors.
Compare one slow request with one fast request to the same path and, where relevant, the same login state. Railway reports responseTime (time to first byte), upstreamRqDuration (upstream request duration) and totalDuration in milliseconds.
- The matching upstream duration is also several minutes. Time the operations inside that handler. If it uses Postgres, measure acquiring a connection separately from executing the query. A long pool checkout followed by a fast query points toward pool contention. A slow query after a fast checkout calls for checking that query and lock waits. Time external API calls and their retries separately. Check CPU and memory for those same minutes before deciding whether more resources would help.
- Railway serves the matching request quickly, but the browser waits minutes. Check redirects, response download time and subsequent browser requests. If there’s a custom domain or CDN, compare the same public path on the generated Railway domain, if available. Choose a route that returns equivalent content on both hosts. A redirect to login on one host is a different test.
- There’s no matching HTTP row. Check the service, environment, hostname and time window. If the client also shows a DNS, TCP or TLS failure, share that exact error. An empty app log alone can’t locate a network failure.
3. Check what actually happens at five minutes. Railway documents a five-minute inactivity limit for public HTTP requests with no data transfer. A single request ending in an error around 300 seconds fits that limit. A page that eventually loads could instead contain a failed request followed by a retry. Preserve log shows the difference. Separately, if Serverless is enabled, compare the first request while the service shows Sleeping with an immediate repeat. A slow first request followed by a fast second is worth checking against startup logs.
If you prefer a terminal, this makes one GET to a public HTTPS route. Replace the example URL with the final URL you’re testing and run it from the affected network:
curl -sS -o /dev/null -D - --max-time 330 \
-w '\nHTTP=%{http_code} DNS=%{time_namelookup}s TCP=%{time_connect}s TLS=%{time_appconnect}s first_byte=%{time_starttransfer}s total=%{time_total}s\n' \
'https://example.com/your-path'
These times are cumulative. For example, TLS at 0.2s and first byte at 299s puts almost the entire wait after the handshake. The command leaves redirects visible and makes no automatic retry. For a login-only route, use the browser capture.
Could you post one slow path, its UTC time, whether it eventually returned 200 or an error, and the matching Railway upstream duration or “no matching row”? Those details would narrow this down considerably. Omit cookies, authorization headers and private query parameters.
Sources
https://docs.railway.com/deployments/troubleshooting/slow-deployments
https://docs.railway.com/observability/logs
https://docs.railway.com/networking/public-networking/specs-and-limits
https://docs.railway.com/deployments/serverless
AI-assisted. I checked the documentation. I haven’t measured your deployment.