Nginx error logs with load balancer

I have stack setup with Nginx as a webserver and a PHP FPM sidekick with a scale set to 10. I also have a Rancher load balancer setup to listen for port 80/443 and forward to Nginx. Some users have been reporting random service outages. Upon checking the logs, I see a lot of entries like the following in the Nginx service:

2018/06/24 05:54:19 [error] 10#10: *630 connect() failed (113: Host is unreachable) while connecting to upstream, client: 10.42.139.179, server: _, request: “GET /path/to/file HTTP/1.1”, upstream: “fastcgi://10.42.173.143:9000”, host: “api.example.com

It looks like 10.42.139.179 is the IP of my load balancer. I can’t seem to find the 10.42.173.143 IP address in any of my containers. Most of the entries in the log are fine, but I do see several errors like this referencing fastcgi (PHP) IP addresses that don’t exist in my stack.

Anyone know why the Nginx container would be trying to communicate with a PHP container that doesn’t seem to exist?

In case anyone else is having the issue, I fixed it by splitting the PHP service out of the sidekick. So PHP and Nginx are separate and no longer sidekick’d together. This got rid of the errors above.

However, it poses a different problem. When I upgrade my PHP service, Nginx still looks for the old PHP container. So I always have to do a “blank” update of Nginx after updating my PHP service. Not ideal, but certainly better than having the site go down from the above errors on and off.