Intermittent "upstream error" — Could it be my PORT settings?
juanmorenodecimetrix
PROOP
18 days ago
My app displayed a blank screen with an “upstream error” for about 5 refresh attempts. Then it went away on its own.
But:
- No APIs in a “crash” state
- No errors in the Railway logs
- No errors in the browser console
- My app didn’t even log the requests
I know that Railway assigns a dynamic port to each container. If I set PORT="3334" manually, I’m overriding that assignment.
Could it be that sometimes Railway’s dynamic port matches 3334 (which is why it works) and other times it doesn’t (which is why the error is intermittent)?
In other words, the Railway proxy expects my app to listen on port X (the one it assigned), but my app is listening on 3334 because I forced it to.
So...
- Can manually setting the PORT variable in Railway cause this kind of intermittent error with no apparent logs?
- Or should I check something else?
- Should I remove PORT="3334" from the environment variables, let Railway handle it, and do a new deployment?
- Is that the correct solution?
Thanks for your help!
0 Replies