title: 502 bad gateway with nginx in network calls
body: <p>I set up load balancing on NGINX using the Round Robin for apache tomcat servers with two servers in my <code>proxy.conf</code> file:</p>
  <pre><code>upstream appcluster1 {
      server IP_ADDRESS1:8000;
      server IP_ADDRESS2:8001;
  }
  
  server {
      location / {
          proxy_pass http://appcluster1;
      }
  
  }
  </code></pre>
  <p>For more details, I am running Geoserver with each of the tomcat server. For the first <code>IP_ADDRESS1</code>, I am successfully able to make calls to it and get layers returned (say if geoserver on the <code>IP_ADDRESS2</code> is down). However, if I switch it and try to make calls to <code>IP_ADDRESS2</code> (and <code>IP_ADDRESS1</code> is down), I am unable to get all of the tiles back from Geoserver. In the network calls, I get a mixture of 200 and 502 errors.</p>
  <p>The two geoserver is exactly the same and not any different from one another. Does anyone know why this is the case -- one Geoserver is able to return calls successfull but the other one only gets partial results back. I am doing all of this using NGINX and the round robin method..</p>
  <p>I also tried to set <code>proxy_next_upstream</code> to <code>off</code> but that didn't seem to work. Any help will be greatly appreciated!</p>