Internal Server Error from GET orders API call

Highlighted
Shopify Partner
2 0 3

We have a process that periodically retrieves all orders updated since the last time we retrieved orders.

 

The initial request passes a `updated_at_min` timestamp which is the greatest timestamp we've retrieved:

 

/admin/api/2019-10/orders.json?limit=250&status=any&updated_at_min=2020-02-09 00:00:00.000-0500

 

We then paginate with the page_info parameter:

 

/admin/api/2019-10/orders.json?limit=250&page_info=eyJkaXJlY3Rpb24iOiJuZXh0Iiwic3RhdHVzIjoiYW55IiwidXBkYXRlZF9hdF9taW4iOiIyMDIwLTAyLTA5IDA1OjAwOjAwIFVUQyIsImxhc3RfaWQiOjIwMzk4NjM2MDczODMsImxhc3RfdmFsdWUiOiIyMDIwLTAyLTAxIDA1OjQ3OjE2In0

 

This morning, we've began to receive `Internal Server Error` responses from the API. Our process retries the request with an exponential backoff, but the request is never successful.

 

Is there any way to mitigate this?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
587 72 129

Hey @bgdc1,

 

I've checked our logs and can see the errors you're referring to, it looks like they all occurred on Feb 13th on a single shop. Can you confirm if the request eventually completed for that store? If you haven't been able to get the request to complete, it's possible one or more of the orders in the set you're attempting to retrieve is very large, in the past we've seen the potential for issues if you attempt to retrieve a particularly large order along with the limit=250 param. If this is the case please let me know and we'll investigate further.

 

The other possibility is that the database for that store was having an issue at the time, which was resulting in timeouts through the API. In either case, the best way to mitigate timeouts is to lower the limit on your request, which results in retrieving a smaller dataset which is less likely to timeout. 

 

 

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes