PROBLEM

Overwriting a service causes the service to ignore tile cache

Last Published: September 16, 2020

Description

After overwriting an existing map or image service that uses a tile cache to draw the data, the new service draws the service dynamically from the data and ignores the existing tile cache.

Cause

This is an expected behavior of overwriting a service by creating a new service definition file. Certain properties can be enforced on the new service, limited to the ones specified during the Service Definition Draft creation process. Refer to ArcGIS Pro: CreateImageSDDraft for more information. However, some properties are reserved for the Service Editor, accessible through the Catalog pane or ArcGIS Server Manager. When a service is overwritten, the Service Editor properties are also overwritten. This causes the Service Editor to reset to the default values of all settings including caching settings.

Thus, the service reverts to the default value of 'Draw dynamically from the data' instead of 'Using tiles from cache', and directly draws data from the service even though the tile cache still exists in the folder path set for the ArcGIS cache directory.

Solution or Workaround

To reuse the cache tiles after overwriting a service, set the service editor properties back to the desired specification. This can be done programmatically using a Python script, as described in the following documentation, ArcGIS Server: Example: Edit service properties.

As an alternative, to update tile caches for referenced datasets, use the following steps:
  1. Stop the service via ArcGIS Server Manager. Refer to ArcGIS Server: Start and stop services for more information.
  2. Locate the data source of the service, and perform the desired edits to overwrite the service.
  3. Start the service.
  4. Use the Manage Map Server Cache Tiles geoprocessing tool, with the Recreate All Tiles option selected under Update Mode to force an update on the tile cache. By not overwriting the service definition draft, the Service Editor properties are not modified.
The sample image of the Manage Map Server Cache Tiles tool

Article ID: 000023393

Software:
  • ArcGIS Server
  • ArcGIS Pro 2 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options