R
Railway13mo 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
Percy13mo ago
Project ID: N/A
MadLex
MadLexOP13mo ago
N/A
Brody
Brody13mo ago
would you happen to have a volume attached?
MadLex
MadLexOP13mo ago
Nope
Brody
Brody13mo ago
you said 500 error, did you mean 503?
MadLex
MadLexOP13mo ago
Oh sorry, 503 yes
Brody
Brody13mo ago
what does your health check consist of?
MadLex
MadLexOP13mo ago
Just a select to a table (Supabase), I don’t really need to warmup my app.
Brody
Brody13mo ago
how long is temporary? can you try increasing the overlap seconds? https://docs.railway.app/develop/variables#user-provided-configuration-variables
MadLex
MadLexOP13mo 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
Brody13mo ago
no problem!
MadLex
MadLexOP13mo ago
hey! did not work
Brody
Brody13mo ago
what did you set it to and how?
MadLex
MadLexOP13mo 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
Brody13mo 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
MadLexOP13mo ago
Thanks anyways! I managed to show an ‘Under Maintenance’ component while its deploying
Brody
Brody13mo ago
that's a pretty good compromise
Want results from more Discord servers?
Add your server