ERROR - HTTP Error 504: Gateway Time-out

3960
1
Jump to solution
03-29-2017 08:58 PM
AlistairFox
Occasional Contributor

When running the following code we are getting random http gateway time-out errors

replica1 = newRep.replicas.create(replica_name = (featureLayer + "_replica"),
      return_attachments ='true',
      attachments_sync_direction='bidirectional',
      layers='0',
      data_format='filegdb',
      out_path = FilesFromAGOL)

DEBUG:root:ERROR - HTTP Error 504: Gateway Time-out

I am looping through 10 hosted feature layers and the above error is thrown randomly at one of them, sometimes at layer 5 sometimes at layer 10. The same code on the same layers has been running fine. Trying to figure out if is an issue on the ESRI end that is stopping the replica creation all of a sudden. 

Any ideas that i can use to test and isolate the timeout source. 

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
StephanieWendel
Esri Contributor

Hey Alistair Fox‌! 

If you're getting a 504 Gateway timeout error, you're dataset is probably too large to process as a sync request (which is the default) before it times out. Instead you'll want to run this as an async request. Try setting the async parameter to true. See more info in the help on the create replica call here: arcgis.features.managers module — arcgis 1.0.1 documentation 

Thanks!

Stephanie

View solution in original post

0 Kudos
1 Reply
StephanieWendel
Esri Contributor

Hey Alistair Fox‌! 

If you're getting a 504 Gateway timeout error, you're dataset is probably too large to process as a sync request (which is the default) before it times out. Instead you'll want to run this as an async request. Try setting the async parameter to true. See more info in the help on the create replica call here: arcgis.features.managers module — arcgis 1.0.1 documentation 

Thanks!

Stephanie

0 Kudos