I'm trying to get product detail from my store using Shopify product REST API. The product count is around 30k. The Shopify API is returning HTTP status code 500 after making several requests. I'm also using cursor-based pagination to paginate the product. Is there any issue on the Shopify end or in my process.
Is there anybody who knows why the error is being returned.
Hey @arslan_iftikhar ,
Most of the time, if you are seeing 500 "Internal Server Errors" intermittently for GET requests it means that there was a timeout on Shopify's end when trying to query our database to obtain and return the results of your query request.
To prevent these 500 "Internal Server Errors" from happening, there are multiple things you can do on your end to make your API request faster and more efficient and less likely to cause timeouts:
Sometimes however, these 500 "Internal Server Errors" are unavoidable and can still occur due to factors that are outside of your app's control (e.g. the Shopify platform being under heavy traffic load from lots of simultaneous requests and therefore slow to complete occurs). Due to this, it is recommended for your app to implement some sort of time delay after retrieving a 500 error and then to retry the request at a later time
If after implementing this time delay functionality, and after following all of the steps to increase the efficiency of your GET requests, you are still regularly seeing getting the 500 "Internal Server Error" response please provide me with the value of the X-Request-ID header from the API response.
Hassain | Developer Support Specialist @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution