Dynamic map service not updating

4454
12
Jump to solution
07-19-2013 11:16 AM
MatthewLofgren
Occasional Contributor
I have a dynamic read only map service, using a file geodatabase local to the server, that wont update unless I restart the service--which I would like to avoid.
Every 5 minutes data is pushed into a file geodatabase and I'm hoping there's a way to have the map service reflect this without a restart.

Schema locking is disabled on the service.
I have tried clearing the rest cache.
I have registered the folder (data store) in server manager. Although, every time I open the data store page the status on all data stores is a question mark. I can click analyze and they all pass, but next time it is back to question marks.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
KevinBell
Occasional Contributor III
I'm not altering the fgdb's schema by deleting and copy a new fc in the old ones place.  That'd be a schema modification and is a no-no.  I delete all of my records in the fc and then add new records back in.  No schema mod.

View solution in original post

0 Kudos
12 Replies
MichaelVolz
Esteemed Contributor
How often do you have the service get recycled?

How often do you check the data connections?
0 Kudos
MatthewLofgren
Occasional Contributor
How often do you have the service get recycled?

How often do you check the data connections?


The defaults:
Recycle every 24 hours at 00:00
Check and repair instances every 30 minutes.
0 Kudos
MichaelVolz
Esteemed Contributor
Since you are updating the data very often, maybe you should change the recycling period to match how often you are updating the file geodatabase.

I'm not sure this will solve your problem, but I would give it a shot.

I'm also not sure how this will impact the performance of your mapservice, but that is what testing is for.

Is your file geodatabase registered in your data store?  I ask because if the data was just copied to the server when created the mapservice because you did not register it with the datastore, then I believe the data on the server is not being updated and that is the file geodatabase that the mapservice is hitting.
0 Kudos
KevinBell
Occasional Contributor III
I'm currently having success with what appears to be the same set up.

fgdb on the server.
datastore registered w/ arcgisserver. 
map service reads the fgdb
Arcmap reads map service...

I refresh mine every minute.  (compact fgdb after each update.)
0 Kudos
MatthewLofgren
Occasional Contributor
I'm currently having success with what appears to be the same set up.

fgdb on the server.
datastore registered w/ arcgisserver. 
map service reads the fgdb
Arcmap reads map service...

I refresh mine every minute.  (compact fgdb after each update.)


I wonder if my data stores are configured wrong. In server manager their status always shows an orange question mark. I can validate it and it passes but the next visit it is a question mark again.

[ATTACH=CONFIG]26147[/ATTACH]


[ATTACH=CONFIG]26148[/ATTACH]

Does this seem right?
0 Kudos
MichaelVolz
Esteemed Contributor
This is also how my registered data stores display on my development server, but I am not constantly updating data like you so I'm not sure if I would have the same issue as you are having.
0 Kudos
KevinBell
Occasional Contributor III
I wonder if my data stores are configured wrong. In server manager their status always shows an orange question mark. I can validate it and it passes but the next visit it is a question mark again.

[ATTACH=CONFIG]26147[/ATTACH]


[ATTACH=CONFIG]26148[/ATTACH]

Does this seem right?


Seems right.  Mine are the same and I update every minute.

My script uses this:
arcpy.env.workspace = os.path.join(sys.path[0])+ r'\default.gdb'

I registered my folder (datastore, whatever) as a UNC path.

Hope that helps!
0 Kudos
MatthewLofgren
Occasional Contributor
Seems right.  Mine are the same and I update every minute.

My script uses this:
arcpy.env.workspace = os.path.join(sys.path[0])+ r'\default.gdb'

I registered my folder (datastore, whatever) as a UNC path.

Hope that helps!


Do you have to restart your map service at all?
Ours only updates only after we restart the map service... which would be fine if it always came back up.. which is a whole other issue.

I found this on the ArcGIS 10.1 help page:

"File geodatabases are intended for read-only use with ArcGIS Server. Because of this, in scenarios where the file geodatabase is a publication geodatabase (in one-way replication workflows), replica synchronization needs to occur during periods of inactivity in the map service or by releasing the file geodatabase from being used by the map service. Releasing the geodatabase can be done by stopping the service or, for multiple-machine sites, by temporarily removing the GIS server machines from the site, then reconnecting them after the file geodatabase has been updated.
ArcGIS Server cannot disable schema locking on file geodatabases."

Ours is under constant light usage so we don't have periods of inactivity as mentioned above. Could that be why?
Also the way we update is by creating a couple new feature classes from data then overwriting by:
arcpy.env.overwriteOutput = True
arcpy.CopyFeatures_management("tempFC", "FC")
0 Kudos
KevinBell
Occasional Contributor III
I'm not altering the fgdb's schema by deleting and copy a new fc in the old ones place.  That'd be a schema modification and is a no-no.  I delete all of my records in the fc and then add new records back in.  No schema mod.
0 Kudos