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:
We then paginate with the page_info parameter:
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?
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