Railways performed a railway-initiated-deployment that basically did not run the build stage
aakash-dhar
PROOP

a month ago

Railways performed a railway-initiated-deployment that basically did not run the build stage of the product leading to a 502 bad gateway

Attachments

Solved

1 Replies

sam-a
EMPLOYEE

a month ago

Hey! We looked into this. On Feb 4 around 06:30 UTC, the host your service was running on in us-east4 underwent a maintenance event (GCP live migration). When this happens, Railway automatically redeploys affected services using the existing container image to get you back online as quickly as possible, rather than waiting for a full rebuild from source.

In your case, your start command runs npm run build && node server.cjs, which means there's a roughly 45 second Vite build at startup before the server starts accepting traffic. During that window, incoming requests returned 502s.

To make your service more resilient to these events, we'd recommend adding a healthcheck (https://docs.railway.com/reference/healthchecks) to your service. This tells Railway to wait until your server is actually ready before routing traffic to it, which would prevent the 502s.

Also worth noting: your Nixpacks build plan already runs npm run build during the build stage, so the one in your start command may be redundant. If you don't need it there (e.g. for runtime environment variables), removing it would make your startups near-instant.

Let us know if you have any questions!


Status changed to Awaiting User Response Railway about 1 month ago


Railway
BOT

25 days ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway 25 days ago


Loading...