1

I have a GeoServer Ubuntu installation reading from a very large PostGIS table (a view with 200000 records). The GeoServer installation is inside a docker container using a NGINX proxy.

The issue is that any getFeature request (even if I request only one feature), will take at least 30 seconds. A SQL directly on that table in PostgreSQL goes fast (it is well indexed). Looking at the GeoServer log shows that most of this time it is hanging on the 'getServiceInfo' request. Getcapabilities requests and Getfeature requests on a smaller PostGIS table work fine.

geoserver_gdal_ecw_support | 25 Jun 08:05:10 INFO [geoserver.wfs] -
geoserver_gdal_ecw_support | Request: getServiceInfo
geoserver_gdal_ecw_support | 25 Jun 08:05:39 INFO [geoserver.wfs] -
geoserver_gdal_ecw_support | Request: getFeature
geoserver_gdal_ecw_support |     service = WFS
geoserver_gdal_ecw_support |     version = 2.0.0
geoserver_gdal_ecw_support |     baseUrl = http://verharding.signaleyes.nl/geoserver/
geoserver_gdal_ecw_support |     count = 1
geoserver_gdal_ecw_support |     outputFormat = application/gml+xml; version=3.2
geoserver_gdal_ecw_support |     resolve = none
geoserver_gdal_ecw_support |     resolveDepth = *
geoserver_gdal_ecw_support |     resolveTimeout = 300
geoserver_gdal_ecw_support |     resultType = results
geoserver_gdal_ecw_support |     abstractQueryExpressionGroup[0] = wfs:abstractQueryExpression=net.opengis.wfs20.impl.QueryTypeIm       pl@69cd2de4 (handle: null) (abstractProjectionClause: null, abstractSelectionClause: null, abstractSortingClause: null, aliases:        null, typeNames: [{verharding}verhardingsobjecten_current_selection]) (featureVersion: null, srsName: null, filter: null, propert       yNames: null, sortBy: null)

Any idea why it is hanging so long at the 'getserviceinfo' request and is there anything I can do to solve this?

Update

according to the log it queries the count of the whole table, it makes sense that this takes a long time, how can I stop that?

geoserver_gdal_ecw_support | 25 Jun 08:32:21 INFO [org.geoserver.wfs] -
geoserver_gdal_ecw_support | Request: getServiceInfo
geoserver_gdal_ecw_support | 25 Jun 08:32:21 DEBUG [org.geotools.jdbc] - CREATE CONNECTION
geoserver_gdal_ecw_support | 25 Jun 08:32:21 DEBUG [org.geotools.jdbc] - SELECT count(*) AS gt_result_ FROM (SELECT * FROM "public"."ver                                                                       hardingsobjecten_current_selection" LIMIT 1) gt_limited_
geoserver_gdal_ecw_support | 25 Jun 08:32:21 DEBUG [org.geotools.jdbc] - CLOSE CONNECTION
geoserver_gdal_ecw_support | 25 Jun 08:32:21 DEBUG [org.geotools.jdbc] - CREATE CONNECTION
geoserver_gdal_ecw_support | 25 Jun 08:32:21 DEBUG [org.geotools.jdbc] - SELECT count(*) FROM "public"."verhardingsobjecten_current_sele                                                                       ction"
geoserver_gdal_ecw_support | 25 Jun 08:32:47 DEBUG [org.geotools.jdbc] - CLOSE CONNECTION
geoserver_gdal_ecw_support | 25 Jun 08:32:47 INFO [org.geoserver.wfs] -
  • try turning logging up to GEOTOOLS-DEV and see what's happening then – Ian Turton Jun 25 at 8:17
1

Thank you, thanks to your comment I managed to answer my own question. It is described here: https://stackoverflow.com/questions/58937565/geoserver-wfs-postgresql-with-large-table-impossibly-slow

I was able to disable the count as follows:

Layers -> <Layer Name> -> Publishing -> Skip the counting of the numberMatched attribute
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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