Docker machine of Nginx with PHP is crushing every few requests

I have a docker with PHP and Nginx. The code deployed is not depending on external service. Every 5 minutes (50-100 requests) I get an error (see the image below) and PHP + Nginx gets restarted. 2019/12/18 08:52:19 [error] 14#14: *7 connect() failed (111: Connection refused) while connecting to upstream, client: 169.254.8.129, server: , request:…

DNS resolution failed: server IP address could not be found

/etc/hosts file has an entry in my development server 10.xx.xx.162 server-dev.xxx-intra.net. ping to server-dev.xxx-intra.net is successful.But when I am trying to access from the browser – https://server-dev.xxx-intra.net, it throws server-dev.xxx-intra.net’s server IP address could not be found. I understand that it is not able to resolve that name to IP but shouldn’t /etc/hosts entry have…