How do I propagate failures from upstream wms-servers?
trondmm-mapserver at CRUSADERS.NO
Tue Nov 6 16:32:22 EST 2007
On Tue, Nov 06, 2007 at 05:52:22PM +0100, Jacolin Yves wrote:
> Why don't you use
> "wms_exceptions_format" "application/vnd.ogc.se_inimage" ?
This is because I have a webcache in front of mapserver, which will
cache requests for about twelve hours, and I need a way to tell an
errormessage apart from a successful response. The way it is now,
blank images sneaks into the cache occasionally, and this is what I'm
trying to avoid.
I need the cache, because we regularly get over 300 requests per
second (highest peak I've seen so far is 604 request in a single
second), and our servers can't handle this load without caching. Over
the last nine and a half days, we've had almost 110 million wms
requests to our cache, and only 4 million went to the backend.
So basically - I desperately need the cache, but it's extremely
important that it doesn't cache blank images or other error messages
embedded in an image, which is why I want mapserver to return an
application/vnd.ogc.se_xml error whenever any sort of error happens.
> Le Tuesday 06 November 2007 17:35:17 Trond Michelsen, vous avez écrit :
>> In my mapfile, I have several layers with connectiontype WMS. Once in
>> a while, the WMS-servers that deliver these layers will fail, usually
>> due to high load, and return an application/vnd.ogc.se_xml
>> exception. In these cases, I'd like mapserver to return an exception
>> as well, but instead, mapserver will just log the error message in
>> MS_ERRORFILE, and continue drawing the rest of the layers. If there
>> are no more layers, it will result in a blank image.
>> (BTW: I've also noticed the same behaviour if the remote wms-server
>> answers with an internal server error)
>> Here's the layer definition that I use for testing. exception.cgi will
>> always return a dummy XML exception.
>> NAME "exception"
>> TYPE RASTER
>> STATUS ON
>> CONNECTION "http://wms1.oslo.dnmi.no/cgi-bin/exception.cgi"
>> CONNECTIONTYPE WMS
>> OFFSITE 255 255 254
>> "wms_srs" "EPSG:4326"
>> "wms_name" "exception"
>> "wms_server_version" "1.1.1"
>> "wms_formatlist" "image/png"
>> "wms_format" "image/png"
>> "wms_exceptions_format" "application/vnd.ogc.se_xml"
>> END #metadata
>> END #layer
>> Is there something I can do to force mapserver to fail, and return an
>> exception if it fails to draw any of the wms-layers?
>> I'm using mapserver 4.10
>> $ cgi-bin/mapserv -v
>> MapServer version 4.10.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
>> OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER
>> SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
>> SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7
>> INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG
More information about the mapserver-users