1

I'm getting a 502 proxy error when sending a wfs GetFeature request. I think there might be multiple problems, but I'm not sure. This URL is not working.

https://WEBSITE.com/geoserver/wfs?service=wfs&version=1.0.0&request=GetFeature&maxfeatures=25&srsName=EPSG:4326&outputFormat=json&CQL_FILTER=gispid = '06-03-0005-0008-0001'&typename=DC:gis2021&contentType=application/json

But if I change it to http and add port 8080 in the URL it works, although it's still takes way longer than it should to retrieve the data.

 http://WEBSITE.com:8080/geoserver/wfs?service=wfs&version=2.0.0&request=GetFeature&maxfeatures=25&srsName=EPSG:4326&outputFormat=json&CQL_FILTER=gispid%20=%20%2706-03-0005-0008-0001%27&typename=DC:gis2021&contentType=application/json

I have another layer that works as it should. Still slightly slower than it should, but not as bad as the other url. How can I get the first URL to work?

https://WEBSITE.com/geoserver/wfs?service=wfs&version=2.0.0&request=GetFeature&maxfeatures=25&srsName=EPSG:4326&outputFormat=json&CQL_FILTER=api%20=%20%274701300843%27&typename=DC:wells&contentType=application/json

EDIT: I'm have Ubuntu 20.04 and I have a reverse proxy setup under proxy.conf that looks like this.

ProxyRequests On

        <Proxy *>
                AddDefaultCharset off
                Order deny,allow
                Allow from all
                #Deny from all
                #Allow from .example.com
        </Proxy>
    
    ProxyVia On

    ProxyPass "/geoserver/" "http://localhost:8080/geoserver/" retry=0 timeout=5 
    ProxyPassReverse "/geoserver/" "http://localhost:8080/geoserver/"
3
  • we need more information, what is your proxy? how is it configured? what makes you think it's too slow?
    – Ian Turton
    Feb 5, 2022 at 9:56
  • I think it's slow because the second link takes about 30 seconds to return the data.
    – cobbBR
    Feb 5, 2022 at 13:55
  • Do you have an index on the ID column you are filtering on?
    – Ian Turton
    Feb 5, 2022 at 17:10

1 Answer 1

2

Okay I figured out what was wrong. I needed to increase the timeout in proxy.conf. It was set to 5 seconds so it was running out of time before the JSON data was returned.

    ProxyPass "/geoserver/" "http://localhost:8080/geoserver/" retry=0 timeout=300 
    ProxyPassReverse "/geoserver/" "http://localhost:8080/geoserver/"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.