R
Railway12mo ago
MadLex

Experiencing 500 Errors During Deployment Switches

Hello Railway team and community, I've been encountering an issue with my Next.js application deployments. Whenever I deploy a new version via a branch trigger from GitHub, I consistently face a 500 error during the switch from the past deployment to the new one. This results in a temporary Railway error page being shown to users. I've tried implementing a health check to verify Supabase's status, but the issue persists. It seems like there's a gap in the deployment process where the new version isn't fully operational before the old version shuts down, leading to service unavailability. Could you provide insights or recommendations on how to achieve a more seamless deployment process on Railway? Specifically, I'm looking for ways to minimize downtime and ensure a smoother transition between deployments. Any advice or guidance would be greatly appreciated. Thank you! Best Regards, Àlex
17 Replies
Percy
Percy12mo ago
Project ID: N/A
MadLex
MadLex12mo ago
N/A
Brody
Brody12mo ago
would you happen to have a volume attached?
MadLex
MadLex12mo ago
Nope
Brody
Brody12mo ago
you said 500 error, did you mean 503?
MadLex
MadLex12mo ago
Oh sorry, 503 yes
Brody
Brody12mo ago
what does your health check consist of?
MadLex
MadLex12mo ago
Just a select to a table (Supabase), I don’t really need to warmup my app.
Brody
Brody12mo ago
how long is temporary? can you try increasing the overlap seconds? https://docs.railway.app/develop/variables#user-provided-configuration-variables
MadLex
MadLex12mo ago
2-5s, enough if the user is navigating within the dashboard during that time awesome, will try it tomorrow morning. Thank you so much!
Brody
Brody12mo ago
no problem!
MadLex
MadLex12mo ago
hey! did not work
Brody
Brody12mo ago
what did you set it to and how?
MadLex
MadLex12mo ago
I set it to 40s, 2x the default value Then I redeployed after env var change and then I made a change to trigger a new deployment
Brody
Brody12mo ago
ill be honest, im not sure what to tell you, ive only seen this kind of issue when the service has a volume
MadLex
MadLex12mo ago
Thanks anyways! I managed to show an ‘Under Maintenance’ component while its deploying
Brody
Brody12mo ago
that's a pretty good compromise
Want results from more Discord servers?
Add your server