R
Railway•13mo ago
ebrin

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:
please read this section of the volume docs https://docs.railway.app/reference/volumes#caveats
Jump to solution
10 Replies
Percy
Percy•13mo ago
Project ID: N/A
ebrin
ebrinOP•13mo ago
N/A
Brody
Brody•13mo ago
do you have a volume?
ebrin
ebrinOP•13mo ago
@Brody yes
Brody
Brody•13mo ago
#🛂|readme #5
Solution
Brody
Brody•13mo ago
please read this section of the volume docs https://docs.railway.app/reference/volumes#caveats
ebrin
ebrinOP•13mo ago
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
Brody
Brody•13mo ago
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
ebrin
ebrinOP•13mo ago
yeah switching the volume shouldn't be a big problem. I'll look into minio, thanks!
Brody
Brody•13mo ago
no problem 🙂
Want results from more Discord servers?
Add your server