The geometry cannot fall outside the replica extent error

8186
8
10-20-2014 01:44 PM
MattCooper
Occasional Contributor

This error is driving me crazy when working with offline geodatabases.  Can anyone explain how to avoid this issue when publishing a feature service or configuring local GDB sync? The error makes it sound like it's a property of the database itself, but almost every time this can be resolved by simply opening up the MXD, zooming out or in a little bit and republishing and downloading a new local gdb for the app.  Oftentimes the difference between it working for a small project area and it not working is that we have to zoom the mxd extent out so it covers the entire US before the error goes away and other times we have to zoom in and set a more reasonable extent in the MXD.  Not fun to try and guess what will make the replica extent work for the area we are working in.

This forum post mentions the exact same issue with Collector and the resolution is to adjust the map extent. We're doing this, but it seems like we're missing something or there is a bug/design that is making this more painful than it has to be.

Any insight into the exact properties that should be set to prevent this issue would be greatly appreciated.  Thanks!

Matt

cc: Michael Davis

Tags (3)
8 Replies
by Anonymous User
Not applicable

Matt,

2 questions if you don't mind.

When you see this error, do you have any data on the generated GDB on your device? Did you selected an extent to take offline without any features? Are you using the ArcGIS Runtime SDK for iOS 10.2.4?

0 Kudos
MattCooper
Occasional Contributor

Hi Al,

We're using 10.2.4, but have had this issue in previous versions as well.  We get this error on new empty databases and existing databases with lots of features, but its not consistent.  Sometimes it works great with no errors and then it will popup seemingly at random. 

Normally we setup the source MXD so it covers the entire project area and we use the AGSGDBFeatureServiceInfo fullExtent property to set the extent on the AGSGDBGenerateParameters to grab all the data. The idea is to get everything in the database instead of a smaller specific area of interest within a project, and in the cases of new projects the database may have nothing in it at all, but we want to be able to collect features anywhere within the extent of the feature service

Thanks for the help!

Matt

0 Kudos
MattCooper
Occasional Contributor

another bit of info...

We have this issue in both the simulator and on a device, but sometimes the simulator will work but then the device throws the extent error.

0 Kudos
by Anonymous User
Not applicable

Matt, Do you mind sending me the geodatabase that even though has features is causing that error? my email is apascual@esri.com

0 Kudos
MattCooper
Occasional Contributor

Will do. I already deleted the problem geodatabase, but we'll save one the next time we encounter the issue.  Thanks for the help!

MichaelDavis3
Occasional Contributor III

Hi Al -

We finally ran into this bug again.  I've emailed you a copy of the geodatabase that throws the extent error, as well as a working geodatabase generated from the same service after republishing (and zooming out slightly)

0 Kudos
MichaelDavis3
Occasional Contributor III

To close the loop on this...

After much troubleshooting and gnashing of teeth we finally identified the source of the problem.

We are running ArcGIS Server 10.2 with a pooled clustered configuration consisting of 2 web adapters machines with a load balancer.  The extent errors we were seeing were actually the result of one of the two web adapter boxes spitting out a different spatial reference than the one defined for the feature service.

In our case the service was configured in Web Mercator based on a geodatabase in WGS84.  Ordinarily this works fine, but in our case at some unknown point in time after starting the service one of the web adapters would start reporting the extent of the service in Lat/Long instead the correct Web Mercator coordinates.  This was apparent when looking at the REST endpoint; every refresh would alternate between WGS84 and Web Mercator as the load balancer dutifully alternated requests between the two machines.

As a result our users would basically have a 50/50 chance of pulling down a database in which they could save data.  If they pulled a database from the server with the bad definition, they ended up with an offline geodatabase with a writable extent in the immediate proximity of NULL island.

What is causing the fail-over machine to get out of whack is still a mystery.  This bug has cropped up in at least 3 projects we know of, and forced us to remove the fail-over machine from our production environment... severely compromising the system's capacity.  The bug has only appeared in projects with the WGS84 database/Web Mercator Feature service configuration.  Projects where the database is in State Plane don't seem to exhibit the bug.

This appears to be a fairly significant bug with ArcGIS Server, does anyone know if this issue will still exist when we migrate the platform to 10.3?

Edit: fixed terminology

ChristopherMilack1
New Contributor III

Matt/Michael,

I ran into the same problem recently just without the clustered server architecture. For some unknown reason AGS started using WG84 for the GDB extent rather than Web Mercator and the result was: "the geometry can not fall outside the replica extent" errors on the client.

We never figured out why/how our service got out of whack but we found a workaround that might benefit you. When we encountered the error, we had been initializing AGSGDBGenerateParameters with  initWithFeatureServiceInfo:. We fixed the issue by using initWithExtent:layerIds: instead and providing a web mercator extent. Hope this helps.

Matt Cooper

Michael Davis

0 Kudos