I am weekly caching my ArcGIS Server mapservice tiles with help of a python script using the arcpy.ManageMapServerCacheTiles_server() command (ArcGIS 10.0, SP5).
For whatever reason, this script fails from time to time. This would not be too bad since I can just restart the script in that case.
BUT after failing, the map service properties are not the same than before: The mapservice property "Maximum time a client can use a service " is now 30,000,000 seconds rather than 60s. I guess ManageMapServerCacheTiles is setting this value at the beginning of the caching and sets it back when finished? Because caching fails, the value is not reset at the end.

Is it possible to have a python script checking this value (or all mapservice properties) and if the value is not correct to stop the mapservice, reset the value and then to restart the mapservice?

Thank you!

  • welcome to SE.GIS forum. Following link may be helpful for you forums.arcgis.com/threads/… – Sunil Aug 23 '13 at 7:19
  • @Sunil thanks for the link! Unfortunately I am somehow not able to change the values by .cfg file. If I change the value and restart the mapservice the changes are not active. Here it says that I have to restart ArcSOM, but I want to avoid that since the downtime is long. By doing it manually in ArcCatalog I don't have to restart ArcSOM so I guess it has to be possible somehow?! – simon134679 Aug 23 '13 at 9:58
  • This may be just an aside, but your options for Scripting Service Publishing with ArcPy are much improved at ArcGIS 10.1 (and 10.2). – PolyGeo Aug 26 '13 at 7:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.