Is there a way to create tile cache at publishing of service?

698
2
02-11-2022 10:12 AM
MKF62
by
Occasional Contributor III

In ArcMap there was a checkbox where you could build the tile cache at publishing of the service. Is there a way to do that in Pro? I have "cache automatically on the server" checked on. The "using tiles from new cache" option doesn't seem to work for building a new cache though. When I publish the service using this method, it succeeds at publishing the map service (although it's empty I think because it's looking for tiles), but it fails at the end saying it could not start the caching tool, thus no tiles are created. In the arcgiscache folder, I see a folder of the name of the service I published, but there are no tiles in the "_alllayers" subfolder. The tool results say this in the last few messages

Validating service definition
Creating the service.
Succeeded.
Publishing map service succeeded.
Publishing tool succeeded.
Successfully completed publishing call
Post-processing on the server
Initializing caching process on the server
Error: Problem submitting tile caching job

Google searches suggest restarting the CachingControllers and CachingTools services which I have done multiple times over. I have also viewed the logs in Debug mode and it seems like something is being submitted with empty parameters:

Error executing tool. Manage Map Cache Tiles Job ID: <ID name>
ERROR 000735: Input Map Service or Image Service URL: Value is required
ERROR 000735: Scales: Value is required
ERROR 000735: Number of caching services instances: Value is required
ERROR 000800: The value is not a member of RECREATE_EMPTY_TILES | RECREATE_ALL_TILES | DELETE_TILES | COMPLETE_JOB | FIX_JOB | RESUME_JOB

Source: System/CachingControllers.GPServer

It's calling Manage Map Cache Tiles tool which requires a cache that already exists. Mine obviously does not so the tool fails; this is why I think "using tiles from new cache" doesn't actually create a new cache at time of publishing. When I hover over that option I also see it mentioning something about "pre-cached" tiles.

I have read the help section for all the tile caching tools and don't really understand how to create a cache. The way that made the most sense to me was to use the Create Map Server Cache tool to create the folders on the server and then use Manage Map Server Cache Tiles to create the tiles. It fails every time telling me there's a feature that failed to project (I'm running check geometry on the feature class now to see if it's corrupted somehow, but it's going to take hours). 

So, how do I create a cache? Am I on the right track? I've been trying to work through this for a day and half.

 

2 Replies
CTCadmin
New Contributor II

I was just experiencing a similar issue, where I was trying to build a cache for a service that I recently removed from ArcGIS Server Manager. The service was no longer displaying in ArcGIS Server Manager, but there was still an empty folder in the cached directory on the machine hosting my server. After deleting the empty folder from the cached directory on the server and publishing the service again using the "Using tiles from a new cache" option, the service published successfully and is creating new tiles.

ChristophK
New Contributor II

I had this issue too. Had to regenerate caches and republish multiple iterations of a service, the cache folder on the ArcGIS Server was not getting deleted when I removed the service via ArcGIS Manager or from Portal.

I had to remove the offending folder manually every time (default path somewhere here: C:\arcgisserver\directories\arcgiscache\servicename).

0 Kudos