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.
9 Replies
9 months ago
322ea2ee-d764-421d-9d11-77dde0980f62
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
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 -
9 months ago
Ah. Interesting. Thanks!
9 months ago
no problem!
9 months ago
!s
9 months ago
:(
9 months ago
!s
Status changed to Solved brody • 10 months ago
9 months ago
🙂