Select to view content in your preferred language

Trying to publish gp service via modelbuilder gp results... locked outputs

4699
9
Jump to solution
03-05-2015 12:17 PM
RoyceSimpson
Frequent Contributor

I've got a model, that I can successfully run in Arcmap over and over (because I've checked the geoprocessing option to "Overwrite the outputs of geoprocessing operations".  However when I publish this to our ArcGIS Server (AGS) as a gp service, I can run it once then the outputs get locked and I can't successfully run it again. If I stop and restart the gp service in AGS I can run the gp task one time, then the outputs get locked again and I'm dead in the water.

Is there somehow a way to replicate the ArcMap "Overwrite the outputs of geoprocessing operations" setting in AGS to allow these outputs to get overwritten?

Thanks,

-Royce

0 Kudos
1 Solution

Accepted Solutions
DavidColey
Honored Contributor

Right, so that dbf has to be output as an inMemory table, it can't remain as physical dbf somewhere.  I have a model that basically does a select by attribute and then a re-select by locataion. It's set up like this:

the output point locations parameter is specified in the tools as

in_memory\OutputPoints

When I publish that result to server from the Results window it works every time becasue the output feature is an inMemory feature.  I'm sure it will work the same with a dbf.

View solution in original post

9 Replies
DavidColey
Honored Contributor

Royce, are you outputting to an inMemory feature class?

0 Kudos
RoyceSimpson
Frequent Contributor

The output is a dbf file called "clipResults.dbf".  There are also two associated lock files for each of our AGS servers in that cluster:  "clipResults.dbf.ARETE.6352.9956.sr.lock" and "clipResults.dbf.COL.15756.21172.sr.lock".

If I try to run the gp service task and those locks are there, I get the following AGS error.  The only way to not get the error is to stop and restart the service, which clearly isn't anything but a very short term solution:

Error executing tool.: ERROR 000258: Output \\lcgfs02\gisserverdata\gp\output\landcover\clipResults.dbf already exists Failed to execute (Table to Table). Failed to execute (Model).

0 Kudos
DavidColey
Honored Contributor

Right, so that dbf has to be output as an inMemory table, it can't remain as physical dbf somewhere.  I have a model that basically does a select by attribute and then a re-select by locataion. It's set up like this:

the output point locations parameter is specified in the tools as

in_memory\OutputPoints

When I publish that result to server from the Results window it works every time becasue the output feature is an inMemory feature.  I'm sure it will work the same with a dbf.

RoyceSimpson
Frequent Contributor

I'm trying that method as we speak!  I can't output to "dbf" though and still have it as "in_memory"... so I took the "dbf" extension off and ran the model and it worked.  I'm republishing now.  Crossing fingers.

0 Kudos
RoyceSimpson
Frequent Contributor

Holy Shzam!  That worked.  "in_memory" is what fixed it!  woot!  Thanks David.

0 Kudos
DavidColey
Honored Contributor

Thanks man, they're tricky aren't they?  Are you going to Dev Summit next week?

0 Kudos
RoyceSimpson
Frequent Contributor

No... UC for me. 

0 Kudos
DavidColey
Honored Contributor

great, have fun.  I'm heading to Dev... still haven't forgotten about that Collector setup either, just haven't got to it yet...

0 Kudos
RoyceSimpson
Frequent Contributor

Ah yes, Collector.  I've got esri looking into it right now.  So far, it's looking like an Oracle bug.  Will keep the thread updated as needed.

0 Kudos