a month ago
Service: swingmatch-backend (US West / sfo), Hobby plan.
All POST requests to /api/analyze (multipart video upload) hang for minutes
then return 502. Browser then shows a CORS error (because the 502 has no
CORS header).
Evidence the request never reaches my app:
-
My handler logs "[Analyze] start" as its first line, but it NEVER prints
for the failing requests, so the request body isn't delivered to the container.
-
GET /health returns 200 instantly.
-
HTTP Logs: POST /api/analyze = 502, durations 15s–5m, while GETs succeed.
-
Memory ~230MB, CPU near zero, no OOM, service stays Online.
-
Restarted and redeployed many times, no change.
-
Requests that go directly to Supabase (not via Railway) all succeed.
Looks like the edge proxy isn't forwarding multipart request bodies to my
container for this service. Started today and persists. Please investigate.
1 Replies
a month ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • 27 days ago
a month ago
Railway has a 5-minute max HTTP timeout, and they currently don't support bumping it. If your video files are large enough that the upload itself takes longer than 5 minutes to transfer, you'll hit this wall regardless of HTTPS. The fix there is to upload directly to Supabase Storage (or S3) from the client and only send the storage URL to your backend for processing — which sidesteps Railway's proxy entirely.
and plain HTTP POST requests gets converted to GET requests that is what must be happeining browser or client is making a plain http:// request but the edge proxy silently converts the POST to a GET (dropping the body entirely) so container sees a GET with no body and then the 5-minute proxy timeout that is why you get the 502. The CORS error appears as a downstream symptom because the 502 response from the edge carries no CORS headers.
