Bulk Operation for 1 product with 1 variant taking 15m+ - what's the worst case time?

Highlighted
New Member
4 0 0

Hi, I have a store with 1 product and 1 variant and I'm polling it 15m+ before my own server times out. Should I expect bulk queries to take this long? It's only this one store that's taking so long (other ones run in 30 seconds to 1 minute), but I don't see why it'd be taking so long after seeing 1 product and 1 variant only.

Context: Using a bulk operation in case someone has a store with 1 item and 1000+ variants.

 

{
      product(id:"${productId}") {
        variants {
          edges {
            node {
              id
              title
            }
          }
        }
      }
    }

 

 

 

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
586 71 128

Hey @kennandavison,

It will depend on the store, if a store has 1000s of products and variants and you run a complex query, 30+ minutes could be expected.

Strange though if it's taking that long on a store with only 1 product. If you can provide the shop_id or the bulkOperationId from your test, I'll use that to investigate further.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
New Member
4 0 0

@_JB gid://shopify/BulkOperation/22232629338 - this is different from the post in the OP, but it's been running for 30m+ already (15m timeout no longer an issue).

 

{
              collections {
                edges {
                  node {
                    id
                    title
                    handle
                    ruleSet {
                      appliedDisjunctively
                      rules {
                        column
                        relation
                        condition
                      }
                    }
                    products {
                      edges {
                        node {
                          id
                        }
                      }
                    }
                  }
                }
              }
0 Likes
Highlighted
Shopify Staff
Shopify Staff
586 71 128

Hey @kennandavison,

It's not unexpected that the last query took longer. Since you're connecting to products through collections, this query needs to work through all the collects that link products and smart collections. Keep in mind that even the product query in your original post can take a while if the store has many products, we don't make any time guarantees for BulkOperations so you should always expect to have to poll it. 

Let me know if you have one that's just looking at a single resource with no connections. If you're seeing this take more than a few minutes on a store with a small product catalog that could indicate an issue, but otherwise it's expected for this time to fluctuate due to many factors including external ones, such as current load on Shopify resources. 

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
New Member
4 0 0

I see. I'm also getting random Bulk Operation cancels like this person: https://community.shopify.com/c/Shopify-APIs-SDKs/GraphQL-Bulk-Operations-randomly-cancelling/td-p/7...

I'm polling every 10 seconds and then it's going from created to cancelled which is strange.

Screen Shot 2020-08-05 at 5.45.37 PM.png

0 Likes
Highlighted
Shopify Staff
Shopify Staff
586 71 128

Hey @kennandavison,

We've made some changes that should address the bulk operation cancellations. Can you confirm if you're still seeing the issue?

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes