Managing fault tolerance in GeoServer metadata

GeoServerAll dynamic WMS sessions start with a client requesting a server’s “GetCapabilities” document.  This document tells the client what layers are available, what parts of the world they cover, and what styles are available to view them with—in short, what the map server is capable of serving.

Sometimes, though, the GetCapabilities document can become corrupted. This is often caused by layer data that GeoServer is unable to access successfully.  Perhaps the administrator had a bad day and made a typo in the password, or there’s a bug in the script that publishes new layers via GeoServer’s REST API, or there might even be a network outage preventing connection to the database.  Whatever the reason, sometimes there are layers in your GeoServer configuration that GeoServer just can’t access.

Historically, when this has happened, any such error would cause GeoServer to produce an error message instead of a normal response. This means that a single layer with a small misconfiguration can effectively block out all WMS clients from accessing your server!  While this type of error reporting does benefit administrators by providing a clear place to find out what layer is causing a problem, it also pushes server errors onto clients unnecessarily.

To remedy this, we recently added a new option to GeoServer called lenient resource handling. With lenient resource handling, GeoServer performs the same error checking that it normally would, but instead of erroring out at the first sign of trouble, it simply omits metadata for layers without usable configurations (while still logging errors on the server).  This way, GeoServer will continue to publish all working layers.

In addition to WMS GetCapabilities response documents, this feature also affects the following responses:

  • WFS GetCapabilities
  • WCS GetCapabilities
  • WFS DescribeFeatureType
  • WCS DescribeCoverage

For DescribeFeatureType and DescribeCoverage, the lenient error handling only affects requests which do not specify layers explicitly in the request.

Lenient error handling is not enabled by default, but you can switch it on easily from the GeoServer web administration interface: In the Global Settings section, set the Resource Error Handling dropdown to SKIP_MISCONFIGURED_LAYERS.

This feature is available in GeoServer nightly builds, and will be included in any upcoming releases.

EmailTwitterFacebookGoogle+tumblrLinkedIn

One thought on “Managing fault tolerance in GeoServer metadata

  1. Pingback: GeoServer 2.2 Released – GeoServer Blog

Comments are closed.