[Tilecache] WMS error handling in tilecache

Andrew Hughes azza at lisasoft.com
Thu Apr 12 03:42:40 EDT 2007


Hi Bart,

The TileCache guys will probably add more value to my reply but here 
goes....

MapServer typically fails to set the http response (mime) type or the 
status code. So that the image/png or text/xml are not set. As well a 
500 response code would be nice.  Combines, this means that a WMS error 
response is not very easily distinguishable from a real map image. 
MapServer is not alone in this behavior...

If you want to overcome this, perhaps you write a proxy script that sits 
in between tilecache and the WMS that performs this detection and 
intercepts the error response so it never reaches TileCache.

hope this is of some help

-- AH

ps, a throttle in TileCache for non-cached tiles would be a nice feature 
to limit overloading too.



Bart van den Eijnden (OSGIS) wrote:
> Hi list,
>
> when a WMS returns an XML error message, tilecache will save this in the
> cache as a (e.g.) jpeg file.
>
> For instance:
> vi ./AAA216/10/000/000/454/000/000/334.jpeg
>
> <?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
> <!DOCTYPE ServiceExceptionReport SYSTEM
> "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
> <ServiceExceptionReport version="1.1.1">
> <ServiceException>
> msDrawMap(): Image handling error. Failed to draw layer named
> &#39;AAA216&#39;.
> An error has occurred: Error 48 "Could not perform Read/Write o: Unable to
> access file. GDALRasterIO() failed: drawGDAL()
> </ServiceException>
> </ServiceExceptionReport>
>
> Should it not just return the error message and *not* save it in the cache?
> Now I will have to delete these files from the cache since this error was
> only occurring on 1 of our 4 WMS production nodes.
>
> Best regards,
> Bart
>
> --
> Bart van den Eijnden
> OSGIS, Open Source GIS
> http://www.osgis.nl
>
>
>
>
>
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org
> http://openlayers.org/mailman/listinfo/tilecache
>
>   




More information about the Tilecache mailing list