title: connect() failed (113: Host is unreachable) while connecting to upstream nginx for aws
body: <p>I know the this question is asked multiple times and not related to aws.</p>
  <pre><code>2020/07/29 10:23:17 [error] 6#6: *37749 connect() failed (113: Host is unreachable) while connecting to upstream, client: 
  </code></pre>
  <p>I am facing this issue while I have deployed nginx in aws cloud.</p>
  <p><strong>localtion configuration</strong></p>
  <pre><code>location /test {
           proxy_pass http://test-service;
           proxy_set_header HOST $host;
           proxy_set_header X-Forwarded-Proto $scheme;
           proxy_set_header X-Real-IP $remote_addr;
           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
           }
  </code></pre>
  <p><strong>Upstream section like below</strong></p>
  <pre><code>upstream test-service {
      server test-service.internal:38102;
      keepalive 10;
  }
  </code></pre>
  <p>Here <code>test-service.internal</code> is my route53 hosted zone entry and it is pointing to some <code>internal application load balancer</code> of aws.</p>
  <p>When I deploy/restart nginx server, it works well but after few days (around two/three days) it will hang in proxy pass only. When I load html content, it works perfectly but proxy pass call stuck.</p>
  <p>Any solution would be helpful?</p>
  <p>Thanks.</p>