Product API timeout

Highlighted
Shopify Partner
18 0 5

Hello,

 

This is Jose from Code Black Belt, the developers of the Frequenlty Bought Together app at https://apps.shopify.com/frequently-bought-together

 

Two recent installations of the app time out every time we call the products.json REST API, as for example with the GET call to /admin/api/2020-01/products.json?published_status=published&since_id=0&limit=250

 

Needless to say, we don't have an X-Request-ID for any of these calls because they time out (the X-Request-ID comes in the response).

 

We are currently doing the same requests for other thousands of stores and everything works perfectly.

 

We reported this using the Shopify Partner Form a couple of days ago but we have not received any response so far. Is there any way to have someone taking a look at it?

 

Thanks in advance.

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1041 140 165

Hey @Jose_Samper 

 

Thanks for reporting this. Can you please DM me example calls/shops?

0 Likes
Highlighted
Shopify Partner
18 0 5

Thanks @SBD_ 

 

We have sent all the details to you via DM. Don't hesitate to ask us if you need any other information.

 

Kind regards,

  Jose

0 Likes
Highlighted
Shopify Partner
18 0 5

Hi @SBD_ 

 

I have a new little piece of information.

 

As the GraphQL API provides more control about the queried fields, we have been testing the loading of these products one by one using GraphQL and it seems that the problem happens when variant presentment prices are included. Of course, we need those presentment prices because our app shows the product prices.

 

Both two stores have multi-currency enabled with 132 currencies, what I imagine increase some processing times.

 

Hope this can help sheding some light on the matter.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1041 140 165

Thanks for all of the information.

 

it seems that the problem happens when variant presentment prices are included

Can you please also provide an example of this succeeding & failing.

0 Likes
Highlighted
Shopify Partner
18 0 5

Hello Scott,

 

Yes, we can confirm that presentment prices seem to be in the root of the issue.

 

Even the REST call succeedes when I remove the 'X-Shopify-Api-Features: include-presentment-prices' request header.

 

I've already sent more debug data via DM.

 

Can you please also provide an example of this succeeding & failing.

If you refer to the GraphQL call to QueryRoot.product, I can reproduce the problem with trying to get one single product data using:

 

 

            {
              product(id: "gid://shopify/Product/12345678") {
                descriptionHtml
                id
                handle
                productType
                title
                vendor
                publishedAt
                tags
                images(first: 100) {
                  edges {
                    node {
                      id
                      src
                    }
                  }
                }
                variants(first: 100) {
                  edges {
                    node {
                      id
                      title
                      inventoryManagement
                      inventoryPolicy
                      inventoryQuantity
                      compareAtPrice
                      barcode
                      price
                      sku
                      image {
                        id
                      }
                      presentmentPrices(first: 132) {
                          edges {
                            node {
                              price {
                                amount
                                currencyCode
                              }
                              compareAtPrice {
                                amount
                                currencyCode
                              }
                            }
                          }
                      }
                    }
                  }
                }
              }
            }

 

 

but it works if I remove the presentmentPrices part:

 

            {
              product(id: "gid://shopify/Product/12345678") {
                descriptionHtml
                id
                handle
                productType
                title
                vendor
                publishedAt
                tags
                images(first: 100) {
                  edges {
                    node {
                      id
                      src
                    }
                  }
                }
                variants(first: 100) {
                  edges {
                    node {
                      id
                      title
                      inventoryManagement
                      inventoryPolicy
                      inventoryQuantity
                      compareAtPrice
                      barcode
                      price
                      sku
                      image {
                        id
                      }
                    }
                  }
                }
              }
            }

 

 

I can provide more details but I think it is easier to test using the REST API, as it involves adding or removing only one request header.

 

Thanks again for your help.

 

Regards,

  Jose

 

0 Likes