Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I've got an ArcGIS Server GeoData service against an SDE MSSql database. When changes are made to the source data, the edits don't appear to show up in the GeoData service.

If I restart the service, edits are available via the geodata service.

Is there something else I should be doing to allow edits to always be available?

=========UPDATE=========

Further investigation revealed that the service did reflect changes, though how long you have to wait is variable. Sometimes the delay is two minutes, sometimes 30 minutes.

At this stage, to force the GeoDataService not the cache any data, I've set the "Virtual Output Directory" of the service to be none. No caching, no problems. Though not ideal, as when no edits are happening, we don't get the performance improvements that caching offers.

Further ideas would be appreciated.

share|improve this question
    
I'm not sure if you're using the REST API to access your data, but have you tried resetting the REST cache to see if that helps? –  Michael Todd Oct 7 '10 at 2:58
    
Michael's right. How you edit your data is relevant to the troubleshooting of your problem. –  GuillaumeC Oct 7 '10 at 7:25
    
I'm not using the REST API. I've got custom ArcObjects code running queries against the gaodata service. It's being edited via a range of sources (ArcMap/other custom data loaders etc). No edits are done via the GeoData service though. –  BlinkyBill Oct 7 '10 at 8:17
    
It still sounds like caching me be an issue. The only reason I keep going back to that is that restarting the service "fixes" the issue. I would try resetting the REST cache or restart the IIS service to see if that helps (and if it does, I'd really like to see someone's answer as to how to reset IIS or the cache automatically after edits; I've been resorting to manual resets). –  Michael Todd Oct 8 '10 at 16:24
    
@Michael. See my update above. By clearing out the "Virtual Output Directory", you may be able to programatically flush the cache. –  BlinkyBill Oct 13 '10 at 3:48
add comment

2 Answers 2

up vote 2 down vote accepted

Cracked It!

The service was referencing a versioned GeoDatabase. The key is that contrary to the docco, when making a connection to a pooled service, you need to manually tell the connection to refresh the version.

Here's a code snippet of my updated connection method.

var som = this.Connection.ServerObjectManager;
this.Context = som.CreateServerContext(this.Service, "GeodataServer");

// get the workspace from the GeodataServer
this.DataServer = this.Context.ServerObject as IGeoDataServer;
this.DataServerObjects = this.DataServer as IGeoDataServerObjects;
this.Workspace = this.DataServerObjects.DefaultWorkingWorkspace;

//Refresh the data.
var version = this.Workspace as IVersion;
if (version != null)
{
    version.RefreshVersion();
}
share|improve this answer
    
I ran into a similar issue with a REST based geoprocessing service reading from a versioned gdb. Thanks for the tip on Pooled vs Non-Pooled services! I was having an issue running a 'SELECT' on newly created features, and this discussion lead me to change the service to Non-Pooled, which is working fine now! I wish there was a way to refresh version in a gp model. Maybe there is and I couldn't find it... –  Ryan Twilley Feb 1 '12 at 22:19
add comment

One option I've discovered is to force the GeoDataService not to cache any data, I've set the "Virtual Output Directory" of the service to be none. No caching, no problems. Though not ideal, as when no edits are happening, we don't get the performance improvements that caching offers.

==Update==

Further testing suggests that there's still something holding onto data. So while this looked promising, it's still not the answer.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.