Select to view content in your preferred language

Error 504 when query 30000 records for feature table

96
1
Monday
Muhammad_AzhaziqBin_Mohd_Azlan
Regular Contributor

Hi,

Our client code already run for 6 months and suddenly we got hit with 504 Gateway Timeout.

svc = gis.content.get(svcid)

layerA = svc.layers[layerA_id]

layerB = svc.tables[layerB_id]

  
recordA = layerA.query(where=query, as_df=True)
recordB = layerB.query(as_df=True)

recordA line works but recordB doesn't work.

Based on the code recordB will query everything which is up to 30k of records. We do have services timeout until 5 minutes.

It seems to be working for past 6 months but only today it doesn't work. I did try to query only for 10 records, but it hits the timeout issue.

The only workaround I have for now is to call layer thru the REST call.

Is it potentially python API issues or environment issues? I'm afraid it might eventually come to recordA once recordA data grow and need to apply the same workaround




0 Kudos
1 Reply
JakeSkinner
Esri Esteemed Contributor

Hi @Muhammad_AzhaziqBin_Mohd_Azlan,

This sounds like it could be a service issue.  If you publish the same data as a new service, are you able to reproduce the issue?

What type of service are you querying?  For example, is it a 11.5 referenced ArcGIS Server service?

What version of the API are you using?

0 Kudos