502 Bad Gateway error when trying to create a product with 30+ variants using GraphQL.

chescko29
New Member
3 0 0

Hi,

I'm getting 502 Bad Gateway error when trying to create a product with 30+ variants using GraphQL. This is not the case if I create a product with fewer variants.

Looking in other cases it looks like it is a common problem, but I didn't found any way to solve this.

Any idea/recommendation?

Thanks.

0 Likes
L_J_K
Shopify Staff
Shopify Staff
282 39 45

Hey @chescko29 

By any chance would you have the request_id from that failing request? I can take a look into it for you. Thanks!

| API Support @ Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
0 Likes
chescko29
New Member
3 0 0

Hi.

After a while doing some test and researching, we finally had to adjust or code to:

1. First, create the product with his variants using productCreate mutation.
2. Then, upload all media files (images) to the product and assign images to each variant.

After that, we have not experienced 502 Bad Gateway errors anymore.

It looks like Shopify have troubles handling mutations with too many variants/images.

0 Likes