clone_items() fails with timeout error

Open
#2,190 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
api, data

Research direction

Start by reproducing the provided clone_items() call with the large feature layer and attachments, then inspect arcgis/_impl/common/_clone.py around line 4270. Compare the timeout behavior with smaller feature layers. Done means establishing the supported size or timeout behavior and documenting a verified workaround, or identifying a reproducible fix.

Written by the indexing model from the issue text.

Description

bug

Describe the bug
I have an ArcGIS Online Hosted Feature Layer, its size is 255 MB, it has attachments with size: 12.53 GB. It's failing to clone (clone_items) due to time out after about 15-20 minutes.

Smaller Feature Layers clone without issues.

Is there a limit to the size of the items we can clone? If there is, is there a way to work around this?

To Reproduce
Steps to reproduce the behavior:

from arcgis.gis import GIS

gis = GIS("https://arcgis.com", "username", "password", expiration=9999)
layer = gis.content.get("featureserviceid")
gis.content.clone_items([layer], "Test Folder")

error:

Your request has timed out. : (Error Code: 504)', <Item title:"item_title" type:Feature Layer Collection owner:username>)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\_impl\common\_clone.py", line 4270, in clone
    raise _ItemCreateException(
arcgis._impl.common._clone._ItemCreateException: ('Failed to create Feature Service service_name: Your request has timed out. (Error Code: 504)', <Item title:"item_title" type:Feature Layer Collection owner:username>)

Platform:

  • OS: Windows 11
  • Browser Edge
  • Python API Version 2.4.0
Dominant language
Python
Stars
2.2k
Forks
1.1k
Avg merge
2h 40m
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Esri/arcgis-python-api

All issues in Esri/arcgis-python-api

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.