Nginx Restart Required
samgordon
PROOP

9 months 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

samgordon
PROOP

9 months ago

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


samgordon
PROOP

9 months 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


brody
EMPLOYEE

9 months 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 -


samgordon
PROOP

9 months ago

Ah. Interesting. Thanks!


brody
EMPLOYEE

9 months ago

no problem!


samgordon
PROOP

9 months ago

!s


samgordon
PROOP

9 months ago

:(


brody
EMPLOYEE

9 months ago

!s


Status changed to Solved brody 10 months ago


brody
EMPLOYEE

9 months ago

🙂


Loading...