Select to view content in your preferred language

Can't get map service to show dynamically updated raster data

713
6
01-11-2013 12:58 PM
RoyceSimpson
Frequent Contributor
I'm sure there is a best practice on this somewhere but so far, I'm pulling a big zero.

I've got an mxd that has a layer of a geo-referenced gif.  The file is actually updated every 5 minutes or so on the file system.  I've got the mxd published as a map service but the map service never updates (after I press f5) to show the latest image.  I can look at the image on the file system and sure enough, it looks different than what I see in the map service JavaScript viewer.

How to I nudge the map service (or MXD) to refresh every 5 minutes or so so the end user will always see the latest image that gets put on the file system?

It seems that every time a users makes a request to view a map service (from the javascript view for example), that map service is not pulling data from the data store every time.  It seems to be caching the data somewhere, somehow.  I don't want that.  I want the end user request to force the map service to retrieve data (in this case a raster file) from it's file system source, every time the request is made.

I've tried clearing browser cache but that doesn't seem to be the issue, as I can go over to another PC that hasn't accessed this service before and it pulls up an old image as well.
Tags (2)
0 Kudos
6 Replies
ThomasFurcron
Regular Contributor
It's been a few months since I worked with arcServer, but I seem to rember there being an option on the map service to allow or not allow the user to store a local cache.  But I'm not sure if that was an option for dynamic map service or only for cached map services. 
Good Luck,

Tom
0 Kudos
RoyceSimpson
Frequent Contributor
It's been a few months since I worked with arcServer, but I seem to rember there being an option on the map service to allow or not allow the user to store a local cache.  But I'm not sure if that was an option for dynamic map service or only for cached map services. 
Good Luck,

Tom


Yeah, that's only for cached services.  Seems like the MXD holds onto a cached version of the image on the file system too.  So the issue seems to be deeper than just not caching map service images on the client side.  The service itself isn't grabbing the latest image as clients request them.
0 Kudos
MattSimmons
Deactivated User
Are you sure the data store(s) are registered with ArcGIS Server?  I ran into a similar issue where my map service wasn't updating dynamically with edits to feature classes I was making.  Turned out that when I initially published the service to Server, the data store(s) weren't registered with Server so it was copying all of the feature classes, images and mxd to a local directory on the server itself. 

In order to clear that local copy, I had to delete the service, register the data store locations with Server and republish.  Once Server knew the communication link between the service and data, the map service became dynamic.
0 Kudos
RoyceSimpson
Frequent Contributor
Are you sure the data store(s) are registered with ArcGIS Server?  I ran into a similar issue where my map service wasn't updating dynamically with edits to feature classes I was making.  Turned out that when I initially published the service to Server, the data store(s) weren't registered with Server so it was copying all of the feature classes, images and mxd to a local directory on the server itself. 

In order to clear that local copy, I had to delete the service, register the data store locations with Server and republish.  Once Server knew the communication link between the service and data, the map service became dynamic.


Pretty sure when I setup the service and did the "analyze" step, it came up with the "data source not registered" thing... so I did that.
0 Kudos
RoyceSimpson
Frequent Contributor
UPDATE:  The map service does seem to update on some sort of periodic basis, but I haven't been able to figure out what period that is, how to change that or how that's defined.

If I fire up the javascript viewer for the service and refresh it every 15 minutes or so, the image I see in on the web page is clearly different than the latest/greatest image that is on the file system... but then, after some time... an hour or two, the web service does in fact update to the latest image if you refresh the page... but then that image sticks for another hour or so.
0 Kudos
RoyceSimpson
Frequent Contributor
I queried Dave Bouwman over at DTSAgile about how they do their "realtime" map service and he mentioned that they put their images into  SQL Server SDE and do a managed raster catalog.

So, I tried creating file geodatabase with an unmanaged raster catalog (gif images reside on file system and simply pointed to by the raster catalog).

In the published MXD I added only the raster catalog... no gif images directly.

In my app, I do a "layer definition" statement to pull out the needed images from the raster catalog.

Now, the map service shows the latest/greatest images on the file system whenever I refresh the the map service.

That isn't a "cure" but a decent work around.  I'll take it.
0 Kudos