[mapserver-users] How to handle unavailable data source in mapObj layer?

Anzel, Phil - NRCS, Fort Collins, CO Phil.Anzel at ftc.usda.gov
Tue Jul 31 11:25:29 PDT 2012


Paolo,

Thanks for your suggestions.

To a certain extent my query was an exploration of what was possible with the current MapServer API. Calls are being invoked by a back-end server using C# for map image creation, so in that context we have fine-grained control. Institutionally we're moving the WMS server whose service we consume from a remote development environment to a much more logically and physically adjacent production environment and expect the 404 errors to disappear (they had in fact been caused by an unanticipated administrative shutdown of the service appliance).

Cheers!

- Phil

-----Original Message-----
From: Paolo Corti [mailto:pcorti at gmail.com]
Sent: Tuesday, July 31, 2012 11:15 AM
To: Anzel, Phil - NRCS, Fort Collins, CO
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] How to handle unavailable data source in mapObj layer?

Hi

> Our layers largely draw from database tables, lately we've started
> consuming remote WMS services and have found that these services are
> occassionally unavailable (such as reporting a "404" HTTP status). The
> "draw()" method throws an exception in such a case, reporting within
> the exception message the failing layer and the status.
>
>
>
> Is there a way to change this behavior? We'd like a softer landing:
> could we define the "must have" layers and allow others to be drawn or
> skipped based upon data availability. We'd also want to be able to
> query the mapObj regarding each layer's success or failure.
>

I maybe wrong, but I do not think there is a way to manage this from MapServer.
As you are using mapscript to compose the map, you could check it out by code the correct response, and only in that case add the layer to the map.
Another possible approach, if applicable (the data are not changing too often) could be to cache the WMS with a tile server, and use the tiles instead than WMS, with the big plus of having better performance as well.

best regards
p

--
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti





This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately.



More information about the mapserver-users mailing list