100% 502 bad gateway when create a product

100% 502 bad gateway when create a product

jh_zzzz
Shopify Partner
2 0 0

i have put the product file here:

https://gist.github.com/jhzzzz/4588ddf40a4f6e4e06f6f9085f04bf48

 

for my problem, the api call is:

 

1. create a new product with title / tags and some other fields

2. create product images one by one with the product id created in step 1

3. update product variants / options with the product id created in step 1

 

Now 100% happens at step 3, when call PUT /admin/api/2022-01/products/[product id].json , it will block for more than 20 seconds, then return 502 bad gateway. sometimes it return an error said product is in updating.

 

i have tried:

1. reduce of variants, but even 3 variants also have problem.

2. sleep 3 seconds after create images, then update variants, no effect.

3. change api version from 2022-03, no effect.

 

when got 502 error, try agian with same parameters, no problem, updated success. but the first time block too long, and 100% happens.

 

Reply 1 (1)

jh_zzzz
Shopify Partner
2 0 0

no problem when do update with the same variants.

maybe it's caused by image creation.