NGINX failing once a week, responds with 499 until NIGNX reload
Solution 1:
Since this is still a open question, and I have found the reason, here it is.
The proxy_pass
in your config is set to a DNS name and not an IP address.
And when nginx
starts, it resolves the DNS name and caches its IP address internally and keeps using it until the next restart.
The solution is to use resolver
directive with valid parameter.
Refer Resolver directive for setting up nginx reverse proxy