Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Sudden increase in 502/503 errors in October from API requests

Sudden increase in 502/503 errors in October from API requests

dpashutskii
Shopify Partner
1 0 0

Hello, 

 

We have Shopify integration with our platform using Ruby Shopify official gem. We're mainly using the integration for creating and completing orders (using DraftOrderCreate and DraftOrderComplete) mutations. We are currentely using "2022-10" schema and 9.5 version of the gem.

 

In October, we noticed a large spike of 502/503 errors in our system that's coming from Shopify. Ruby gem throws 

Net::ReadTimeout and Net::OpenTimeout exceptions but inside the response from Shopify we just see
 
{"errors"=>[{"message"=>"502 Bad Gateway"}]}
 
A few examples of the errors timestamps from today (UTC time):
  • October 24, 2023, 5:08:18.910 AM - 502 on DraftOrderComplete
  • October 24, 2023, 8:26:09.958 AM - 503 on DraftOrderCreate
  • October 24, 2023, 6:21:34.153 AM - 502 on DraftOrderComplete
  • October 24, 2023, 6:27:42.621 AM - 502 on DraftOrderComplete
 
Yesterday, we got 252 (!) errors
 
Appreciate any help.
 
This graph  shows the amount of errors by month:
 Screenshot 2023-10-24 at 10.53.57.png
Reply 1 (1)

Gregarican
Shopify Partner
1033 86 292

Sounds like service provider issues on Shopify's end. See this for specifics --> https://shopify.dev/docs/api/usage/response-codes#:~:text=A%20502%20error%20isn't,trying%20to%20get%...