Nginx in front of Galaxy and Galaxy changing ips of instances


We have nginx running in front of Galaxy so that we can run a blog at /blog and have everything else go to the Meteor site.

This was all working fine, but then suddenly Nginx began timing out and would only start working again when we did a restart of nginx.

The issue seems to have been that nginx was trying to hit a cached IP, but Galaxy had changed the IP of our hosted instance. Restarting nginx fixed this. In our nginx conf file we’re not pointing at an ip but our address. Has anyone else had this issue and how do you get around it?

We see this in the nginx docs:

By default, nginx caches answers using the TTL value of a response. An optional valid parameter allows overriding it:
resolver [::1]:5353 valid=30s;

Does Galaxy set too high a TTL in that case?