we are running GeoServer (2.26.1) to publish forestry related geodata with sources being our own DB as well as cascaded WMS. When trying to add county boundaries from a public WFS and publishing it as WMS, the rendering takes quite long (8-9 s), so that the smartphone app that uses those layers runs into a timeout:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE ServiceExceptionReport SYSTEM "https://myPortal/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd?authkey=99999"> <ServiceExceptionReport version="1.1.1" > <ServiceException code="internalError">
> Rendering process failed. Layers: nora_v_al_kreis Timeout
> waiting for connection from pool Timeout waiting for connection from
> pool </ServiceException></ServiceExceptionReport>
The GeoServer layer preview does show up after those 8-9 s and there does not seem to be an error in the logs.
We did test changing connection and read timeout as well as feature buffer size; and we tweaked heap size and garbage collection - with no recognizable effects.
We are experiencing this with several different public cascaded WFS. But layers from GeoSolutions WFS are working just fine.
I am attaching the log of the calls to gs_us_states (line 187) and our county boundaries (v_al_kreis; line 369).
What is slowing this down, do you see anything in here? We appreciate any hint and idea very much!
I have only used Cascaded WMS and WFS in situations where GeoServer is being the public face for information that is maintained internally in a WMS or WFS service that does not wish to be shared publicly:
Sometimes for security reasons, the cascading WFS may have permission to reach a WFS layer directly managed by an internal team
Sometimes for compatibility reasons (GeoServer offers WMS features that other vendors do not)
Re-publishing from a public WFS that you do not control … leaves you open the problems you describe. You may wish to harvest the WFS data into a PostGIS database or similar to ensure consistent performance.
You may also consider negotiating faster access with the provider of the public WFS?
Hi @jive ,
Thanks for your feedback.
That WFS is part of the state’s open data service, so I assumed that there are no inhibiting security issues. I can embed it into QGIS without any problems. Harvesting into our PostGIS is a possibility but we would then loose the benefit of not having to care about updating the data…
I will try to get hold of somebody at the provider to check about access and compatibility.
Ok, the download is large, but it took 15 seconds before the server provided even one byte in response, and then it took almost 9 minutes to respond fully… a peak speed of 2.7MB/s is also too slow…
What you can do to render it anyways, besides seriusly upping all timeouts, both network and rendering ones, is to disable connection pooling, and the tile cache it. For that roads layers I also recommend enabling a serious scale dependency so that the full set of roads is never rendered.
What Jody said is, operationally, better… for cascading you need good speed, probably best to periodically dump it to a local database (e.g., once a day using ogr2ogr for example).
Thank you, @jive & @aaime-geosolutions .
The data provider couldn’t really assist in granting faster access. But your general operational remarks on how / when to utilise WFS have certainly been helpful. We will use a similar WMS (where we need to build a layer group to get what we wanted).
Best, Marcus.