New Shopify Certification now available: Liquid Storefronts for Theme Developers

Seemlingly random 500 Errors on the orders API

luis-varela
Shopify Partner
1 0 0

Hey there,

 

We use the "https://#{shop_name}.myshopify.com/admin/orders.json" endpoint for fetching orders from our customers. For a few set of customers we get 500 errors on a daily basis (we run a daily job that pulls this data), and we would like to understand the reasons behind these errors and potential solutions. When we get this error, we retry with a lower order limit, getting us the way down to 29 orders per request, but still get the error. Sometimes when we try to query the same link manually it works, and sometimes it does not. 

 

We were wondering if changing our implementation to the GraphQL endpoint would solve this issue with a high likelihood? Decreasing the time window? Or maybe implementing the bulk loading solution would work too? We would really appreciate a very definitive answer to justify the investment of engineering resources in these changes.

 

Here are the request ids for two of the shops we are having issues with:

 

Customer 1: 

"f05c88b1-658a-42b8-8597-01ffda86484a" (250 limit)

"a9c402bf-6030-4ffc-a89a-6fed2547978d"

"b57fb492-bcf6-479a-a398-38b28bcddae4"

"c59749d2-6d58-454b-879a-a2c34414e527"

"02c22781-56a2-4d6a-aad5-5df4ff1e5be2"

"95994826-eac4-4af5-85b9-b0d5220c21ef" (29 limit)

 

Customer 2:

"441bbb05-631c-495c-9949-585b9c2d0fc3" (250 limit)

"9c23018e-a81a-41e2-b660-df98733ad1af"

"f5059b9e-b670-40d1-a6dd-ce658cb5f1de"

"d8f3a944-6bab-4115-8ea9-acc0c6a0d8c6"

"262455f8-4f21-4e4a-a9e9-e03371b10bf6"

"16e9acec-8903-4a87-b434-ddaea26f3962" (29 limit)

Reply 1 (1)
sd_
Shopify Staff (Retired)
Shopify Staff (Retired)
51 10 7

Hi @luis-varela,

 

We recently implemented a fix for timeouts from the orders endpoints that were occurring upon the release of the order editing feature. In general these timeouts should no longer be occurring. 

 

If you are pulling large sets of data on a daily basis a more optimal solution may be to use our GraphQL Bulk Operations: https://help.shopify.com/en/api/guides/bulk-operations the benefits of this being the ability to specify exactly which fields are relevant for your needs and the ability to poll for results as the operation is running. GraphQL Bulk Operations queries respond with a file in the JSONL format. More information is available in the guide linked above.

To learn more visit the Shopify Help Center or the Community Blog.