How are you updating published map services on ArcGIS Server?

301
6
02-28-2020 02:02 PM
ShawnHalphen
New Contributor

Hi all, I have several published map services that have data that is updated once or twice a year. Many of the map services may contain the same layers that we serve to end-users that have different needs. When a layer is updated in our enterprise geodatabase, I have been manually searching for and re-publishing up to 6 or 7 different map services that are stored in different folders on the network. This is sort of tedious and often gets put on a lower priority and our users may not have the most up-to-date data as a result of this. Does anybody have tips to share that they use to keep track of layers that are in published map services? Maybe I am doing things wrong, but I haven't been able to find anything online that suggests that I am.

Thanks for your time!

Reply
0 Kudos
6 Replies
jcarlson
Regular Contributor

Are you on Map or Pro? We have a sort of similar situation where I work, and we keep all the maps in a single Pro package. With a carefully written python script, you can even iterate through all the maps in a project and republish them, and schedule that script to run at select intervals.

- Josh Carlson
Kendall County GIS
ShawnHalphen
New Contributor

I currently use Map to publish map services, but eventually we would need to switch to Pro. I like your idea of having them in a single Pro package.

ValCannon2
New Contributor III

I am also trying to move my publishing from ArcMap to ArcGIS Pro but I have found the update workflow needs to change.

When publishing from ArcMap, I used a feature class in a registered file geodatebase. To update I would:

  1. Create a new feature class with "_new" appended to it
  2. Delete the old feature class
  3. Rename the new one by removing "_new"
  4. Restart the service

This worked great for several years and the service was down for less than a minute when I updated.

I tried this workflow in ArcGIS Pro but found that I couldn't delete or rename a feature class that is being used as a source for a running map service. A co-worker, tminterWork , suggested I use a model to remove and replace the records in the feature class instead of trying to replace the entire feature class. This appeared to work but after the update my JavaScript application couldn't get an accurate count of the total number of records from the map service, even after restarting the service several times. It only corrected itself after the server was restarted.

I also found that the service published from ArcGIS Pro is much slower than the one published from ArcMap. Has anyone else encountered any of this?

Reply
0 Kudos
ValCannon2
New Contributor III

The inaccurate record count turned out to be a cache issue in Chrome. Clearing the cache fixed it. I suppose I can fix this with HTML somehow.

Reply
0 Kudos
jcarlson
Regular Contributor

Try checking your web server's settings, you ought to be able to adjust caching settings so that end users don't run into that issue.

- Josh Carlson
Kendall County GIS
Reply
0 Kudos
ValCannon2
New Contributor III

Good idea. My web.config file already has this header. I'm using IIS. Anything else I should check?

<httpProtocol>
   <customHeaders>
      <add name="Cache-Control" value="no-store, no-cache, must-revalidate " />
   </customHeaders>
</httpProtocol>

Reply
0 Kudos