title: GeoServer times out (504 Gateway Time-Out) when accessed from OpenLayers via nginx webserver
body: <p>I have developed an OpenLayers web app that uses GeoServer.  I am using nginx as my webserver with proxy_pass setup for GeoServer.  Everything works as expected when I use "localhost" but when I switch to my IP address I get a 504 Gateway Time-Out error for</p>
  
  <pre><code>http://98.153.141.207/geoserver/cite/wfs.  
  </code></pre>
  
  <p>I can access GeoServer at</p>
  
  <pre><code>http://98.153.141.207/geoserver/web
  </code></pre>
  
  <p>via a browser without problem so it would appear the proxy continues to work as expected.   </p>
  
  <p>The GeoServer log shows this when the problem occurs:</p>
  
  <pre><code>Request: describeFeatureType
      service = WFS
      version = 1.1.0
      baseUrl = http://98.153.141.207:80/geoserver/
      typeName[0] = {http://www.opengeospatial.net/cite}MyLayer
      outputFormat = text/xml; subtype=gml/3.1.1
  </code></pre>
  
  <p>Then after a minute, I get the 504 Gateway Time-Out in my JavaScript console and this      shows up in the GeoServer log:</p>
  
  <pre><code>09 May 06:02:15 WARN [geotools.xml] - Error parsing: http://98.153.141.207/geoserver/wfs/DescribeFeatureType?version=1.1.0&amp;typename=cite:MyLayer
  </code></pre>
  
  <p>I have tried this supposed problem URL in a browser and it works fine. </p>
  
  <p>The nginx erorr log contains this:</p>
  
  <pre><code>2013/05/09 06:02:15 [error] 420#3844: *54 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 98.153.141.207, server: localhost, request: "GET /geoserver/wfs/DescribeFeatureType?version=1.1.0&amp;typename=cite:MyLayer HTTP/1.1", upstream: "http://127.0.0.1:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&amp;typename=cite:MyLayer", host: "98.153.141.207"
  </code></pre>
  
  <p>Further investigation reveals that this problem seems to be restrict to WFS layers only.  The WMS layers work fine.   Here is the declaration of my WFS layer that fails:</p>
  
  <pre><code>myLayer = new OpenLayers.Layer.Vector("MyLayer",
                                      {
                                        strategies: [new OpenLayers.Strategy.BBOX(),saveStrategy],
                                        projection: "EPSG:2276",
                                        protocol: new OpenLayers.Protocol.WFS(
                                        {
                                          version: "1.1.0",
                                          url: "http://" + hostip + "/geoserver/cite/wfs",
                                          featureNS: "http://www.opengeospatial.net/cite",
                                          srsName: "EPSG:2276",
                                          featureType: "MyLayer",
                                          geometryName: "Poly",
                                          schema: "http://" + hostip + "/geoserver/wfs/DescribeFeatureType?version=1.1.0&amp;typename=cite:MyLayer"
                                        })
                                      });
  </code></pre>
  
  <p>Any help would be appreciated.  Thanks</p>
  
  <p>I managed to get this working by remove the "schema" property from the OpenLayer.Protocol.WFS of my layer.  Can anyone explain why this would be the problem?</p>