We can definitely do our best to help you troubleshoot why this error is happening. Could you please provide the value of the “X-Request-ID” header from your bad API responses? With this value we can search through our logs and better understand why this error is occurring.
If I had to make an initial guess as to why you may be receiving that error, usually a 502 error from our API means that you had requested too much information through the API and it caused the SQL query on our end in order to get that data to take too long and eventually time out. So the solution to this would be to request less data through the API request, or adjust the parameters of your request to make the query more efficient. However if you can provide the value of the X-Request-ID header it would help me confirm is my suspicions are true or not
This email is a follow up to ticket #36432 regarding the Shopify Downloads. Error we are receiving: 502 Bad Gateway
Steps attempted for fix:
-PC Restart
-Readded app on Shopify backend
-Regenerated Shopify Token
-Tried switching the fulfillment location
-Ran trace routes to api.shopify.com with about a 50% loss
-Tried access Shopify store from different computer
-Found Cloudflare is re-routing California city
Please help us to determine what is causing the issue of Oxford Diamond Co Shopify store’s 502 Bad Gateway download error, thank you!
Let us know if you require any additional information, thank you.
Indeed, we are querying the Order API for a very broad set of data including paging for the last 3 months (with the max. number of results == 250).
Thats because we need all this data for an accounting export and it has worked very well for the last 10 months.
Unfortunately, we do not log the Shopify response headers on our servers, so I can’t provide a Request ID at this time but will try to get one if the error persists. The store where this happens most of the time is “bergmensch.myshopify.com”, although I have seen the error for other (Germany) based stores in the meantime.
Since our customers need those reports urgently, we have now implemented a retry-mechanism as a fallback strategy. It seems like after the first request the result is available (cached?) and the second request goes through.
Also, yesterday late evening (Berlin time), the requests also succeeded without any errors, so I guess this might be a general server-load issue?
Yes, we do cache the results of the query. So even if you timeout and get a 502 the first time, the second time you make the request most of the data will already be cached so you are more likely to get all of the data back without timing out this time. And yes, based on current server/platform load it can effect if your query for data will timeout or not. So the re-try you are performing is good practice. Other good practices for avoiding API timeouts include requesting for less data at one time, and using pagination in your API request (https://help.shopify.com/en/api/guides/paginated-rest-results)
I see you have an open Support ticket already with ShipWorks and Shopify support staff, so I am sure they will do their best to help resolve this issue for you
Hello We are experiencing many error messages and shopify website freezes. We can not see our site no more we are using google chrome and see this message.
its being happening on and off for 4 days already from today’s day 7/17/20. What is happening!! where is our live site!
Hello, I manage to solve the problem by following the following pasts.
Step 01: I cleared the entire browser cache and then closed the browser.
Step 02: Now on the keyboard, press the WINDOWS key, hold, and then press the R key and this run window will open, and let’s type CMD and you can click ENTER.
Step 03: Now in CMD, it’s very simple, let’s type IPCONFIG /FLUSHDNS, OK you can click ENTER. Ready the browsing cache has been successfully cleared.
This issue is coming up from time to time and we fixed it by implementing a retry mechanism for this specific error code (it is not about the regular rate limiting, which can be detected by looking at the headers of the response). I think this occurs either because of the explanation from Shopify support provided in this thread (long running database queries and the proxy server is aborting the web request) or maybe due to load balancing, where the request is routed to a shopify instance which is shut down while processing it (?). Either way, implementing the retry (up to 3 times) solved it for us and none of our customers had that problem anymore.