Skip to content
Nginx Restart Required

2 years ago

Whenever I redeploy my frontend or backend, all requests to that redeployed service hang until Nginx is restarted. What could cause this behavior? Doesn't happen on my locally hosted VPS with the same containers.

Solved

9 Replies

2 years ago

322ea2ee-d764-421d-9d11-77dde0980f62


2 years ago

https://github.com/Loudbooks/PasteBook/blob/master/nginx/default.conf.template

My config is here. The variables are replaced to their internal Railway counterparts, for example backend.railway.internal:8080


2 years ago

background: services on Railway all have dynamic ips that change every deployment.

problem: nginx caches the ip on boot and doesn't reevaluate it, when you deploy the upstream nginx is left making requests to an ip that doesnt go anywhere.

solution: use caddy -


2 years ago

Ah. Interesting. Thanks!


2 years ago

no problem!


2 years ago

!s


2 years ago

:(


2 years ago

!s


Status changed to Solved brody • over 1 year ago


2 years ago

🙂


Welcome!

Sign in to your Railway account to join the conversation.

Loading...