How to prevent users from seeing the Application failed to respond page?
So I have a uvicorn setup and whenever I restart / redeploy the service, it seems the Railway is waiting for the uvicorn to shutdown and during this time the webpage shows the Railway's "Application failed to respond" page (503 error). This usually takes under a minute, but I'd still like to avoid it if possible.
Here's the Deploy logs (from uvicorn):
INFO: Shutting down
INFO: websocket connection disconnect!
INFO: connection closed
INFO: Waiting for application shutdown.
INFO: Started server process [1]
INFO: Waiting for application startup.
INFO: Application startup complete.
The railway screen shows up until the "Application startup complete" log.
Solution:Jump to solution
please read this section of the volume docs https://docs.railway.app/reference/volumes#caveats
10 Replies
Project ID:
N/A
N/A
do you have a volume?
@Brody yes
#🛂|readme #5
Solution
please read this section of the volume docs https://docs.railway.app/reference/volumes#caveats
I understand there being downtime, I'd just like to not display the railway webpage when it's not accessible.
The main concern is that I also have an IOS app which is mirroring the railway deployment and it looks pretty bad in that case
you can put your service behind another proxy that displays a more appropriate page during that period
or instead of having a volume on that service, use minio in the same project, that way you have the volume on a different service and read / write files to that service through the S3 sdk. of course I don't know know what kind of app you are running so that kind of refactor may be completely out of the question
yeah switching the volume shouldn't be a big problem. I'll look into minio, thanks!
no problem 🙂