Random 502
alex-parnidia
PROOP

2 months ago

We're getting intermittent 502s. They are random, the services are working fine majority of time. It's happening on more than one service in different projects.

The problem is that these 502s aren't recorded anywhere we can see:

Network Logs - HTTP shows no 502s.

Deploy logs are clean - no restarts, no crashes, no errors.

I only have one example response that client shared with us

"""

upstream error

","exception":"Illuminate\Http\Client\RequestException"}

"""

$20 Bounty

7 Replies

Railway
BOT

2 months ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • about 2 months ago


2 months ago

I notice the error you shared is a Laravel outbound request error, is your client using Laravel to make the request or are you using Laravel and that's the error your client is seeing?

If it's the latter then it's not Railway that's failing with 502 but your app is reliant on some sort of external service which is returning 502 and your app is likely failing there which is surfaced to your client

Let me know if it's the former though (your client using Laravel to make the request)


ededddy
FREE

2 months ago

Just to give out my experience. A while ago, I was migrating from Zeabur to Railway.

The issue I hit was the API URL used for proxying requests from TanStack Start to Python backend. I used the wrong internal URL and giving out 502 Bad Gateway.

Hope this helps to diagnose the issue.


dev

I notice the error you shared is a Laravel outbound request error, is your client using Laravel to make the request or are you using Laravel and that's the error your client is seeing? If it's the latter then it's not Railway that's failing with 502 but your app is reliant on some sort of external service which is returning 502 and your app is likely failing there which is surfaced to your client Let me know if it's the former though (your client using Laravel to make the request)

alex-parnidia
PROOP

2 months ago

Its the client using Laravel to make the request. We oursleves use express.js


ededddy

Just to give out my experience. A while ago, I was migrating from Zeabur to Railway. The issue I hit was the API URL used for proxying requests from TanStack Start to Python backend. I used the wrong internal URL and giving out 502 Bad Gateway. Hope this helps to diagnose the issue.

alex-parnidia
PROOP

2 months ago

But this would make all request fail presistenly, if url is wrong. In our case is random.


2 months ago

Do you use any proxies (e.g cloudflare)?


dev

Do you use any proxies (e.g cloudflare)?

alex-parnidia
PROOP

2 months ago

no proxies.


deden
FREE

a month ago

Hi


Welcome!

Sign in to your Railway account to join the conversation.

Loading...