Select to view content in your preferred language

Deleting features causes a 504 timeout error

770
2
11-09-2021 07:01 AM
OlgaKoblet
Emerging Contributor

Hi all, 

I am deleting features (delete_features function) from a hosted features service in chunks. It used to work with a chunk size of 500, but now I get the 504 timeout error unless I go down to the cunks of 10.

chunks = [listofoids[x:x + servicemaxitem] for x in range(0, len(listofoids), servicemaxitem)]"
for index, chunk in enumerate(chunks):
result = layer_to_update.delete_features(deletes = str(chunk).strip('[]'))

Does anybody now what happend and how to fix it?

 

The error message (your request has timed out):

OlgaKoblet_0-1636470001911.png

 

 

Tags (3)
0 Kudos
2 Replies
EdAmrhein1
New Contributor

I don't have a fix but can tell you that you're not alone.  Ever since the last AGOL upgrade I've been experiencing the same thing on code that has worked great for more than a year.  It also seems like notebooks take longer to open than they used to.  

0 Kudos
OlgaKoblet
Emerging Contributor

Deleting features is now (since when?) performed through edit_features function 

delete_result = ports_flayer.edit_features(deletes=str(Redlands_objid))

 https://developers.arcgis.com/python/guide/editing-features/

0 Kudos