Does clone_items() have a size limit for hosted feature layers?

1045
4
09-23-2021 06:16 AM
CarstenB_orsted
New Contributor III

 

I have created a script for cloning hosted feature services from one portal to another using the clone_items method. The script works as expected with smaller feature services. However when using large feature services, I get this error:

('Failed to create Feature Service MyService: list index out of range', <Item title:"MyService" type:Feature Layer Collection owner:portaladmin>)

It seems as if there is a limit on how large a feature service that can be cloned. I did some experiments with a feature class with app. 1100 polygons. I limited the number features with a definition query in the map, shared it with Portal A and cloned to Portal B. Repeating this process, increasing the number of features, I started getting the error at app. 900 features. But I don't know if it is the actual number or (more likely) a certain size that triggers the error.

I can't find anything in the documentation.

Does any know of a size limitation of clone_items or have I missed something?

 

 

 

 

 

Tags (1)
0 Kudos
4 Replies
MehdiPira1
Esri Contributor

@CarstenB_orsted ,

I had a quick look and I couldn't find anything regarding the item cloning size limits either.

You can contact the ArcGIS API for Python support to find out:

https://support.esri.com/en/Products/Developers/scripting-and-automation/arcgis-api-for-python/

CarstenB_orsted
New Contributor III

 

Thanks! I already contacted support yesterday, and they are investigating the issue.

0 Kudos
CarstenB_orsted
New Contributor III

 

I just heard from Esri Support. There is already logged a bug on the issue.

Bug Number: BUG-000122287 

Unfortunately the bug has status "Closed" and "Not in production plan" and the advice is to use workarounds as exporting or duplicating the schema and appending.

0 Kudos
MehdiPira1
Esri Contributor

@CarstenB_orsted ,

I checked the log. It's recommending a workaround which reducing the number of vertices in features using Generalize tool in ArcGIS Pro. This is quite helpful when you don't have a lot of feature classes already published.