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
Project ID:
N/A
N/A
would you happen to have a volume attached?
Nope
you said 500 error, did you mean 503?
Oh sorry, 503 yes
what does your health check consist of?
Just a select to a table (Supabase), I don’t really need to warmup my app.
how long is temporary?
can you try increasing the overlap seconds?
https://docs.railway.app/develop/variables#user-provided-configuration-variables
2-5s, enough if the user is navigating within the dashboard during that time
awesome, will try it tomorrow morning. Thank you so much!
no problem!
hey! did not work
what did you set it to and how?
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
ill be honest, im not sure what to tell you, ive only seen this kind of issue when the service has a volume
Thanks anyways! I managed to show an ‘Under Maintenance’ component while its deploying
that's a pretty good compromise