GraphQL Bulk Operation for products failing with INTERNAL_SERVER_ERROR

We have a customer that is facing this errorCode: INTERNAL_SERVER_ERROR when performing bulkOperations.

When we ask for bulkStatus we are having this as response:

     [id] => gid://shopify/BulkOperation/3657511993425
     [status] => FAILED
     [errorCode] => INTERNAL_SERVER_ERROR
     [createdAt] => 2025-05-23T18:54:22Z
     [completedAt] =>
     [objectCount] => 337
     [fileSize] =>
     [url] =>
     [partialDataUrl] => https://storage.googleapis.com/shopify-tiers-assets-prod-us-east1/bulk-operation-outputs/.....

This is the query:

        mutation {
          bulkOperationRunQuery(
            query:"""
            {
              products {
                edges {
                  node {
                    id
                    handle
                    descriptionHtml
                    status
                    media {
                      edges {
                        node {
                          id
                          ...on MediaImage {
                            image {
                              id
                              url
                            }
                          }
                        }
                      }
                    }
                    collections(query:"collection_type:custom") {
                      edges {
                        node {
                          id
                          title
                        }
                      }
                    }
                    options {
                      name
                      position
                      values
                    }
                    variants {
                      edges {
                        node {
                          id
                        }
                      }
                    }
                    productType
                    publishedAt
                    tags
                    templateSuffix
                    title
                    vendor
                    totalInventory
                    metafields {
                      edges {
                        node {
                          id
                          namespace
                          key
                          value
                          definition {
                            name
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
            """
          ) {
            bulkOperation {
              id
              status
            }
            userErrors {
              field
              message
            }
          }
        }

Thanks!

Adding info. I made another graphql bulk operation call with this other query and also having the same INTERNAL_SERVER_ERROR.
Note: I have a ton of customers doing the same queries and all of them works without any issue. There is only one that is having this kind of issues so I don’t know how to proceed

Here the other query

mutation {
  bulkOperationRunQuery(
    query:"""
    {
      products {
        edges {
          node {
            id
            variants {
              edges {
                node {
                  id
                  barcode
                  compareAtPrice
                  inventoryItem {
                    id
                    inventoryLevels {
                      edges {
                        node {
                          id
                          quantities(names: ["available"]) {
                            name
                            quantity
                          }
                          location {
                            id
                            fulfillmentService {
                              id
                              inventoryManagement
                            }
                          }
                        }
                      }
                    }
                    measurement {
                      weight {
                        unit
                        value
                      }
                    }
                    unitCost {
                      amount
                      currencyCode
                    }
                    countryCodeOfOrigin
                    harmonizedSystemCode
                    provinceCodeOfOrigin
                    tracked
                  }
                  inventoryPolicy
                  inventoryQuantity
                  price
                  sku
                  taxable
                  taxCode
                  selectedOptions {
                    name
                    value
                  }
                  media {
                    edges {
                      node {
                        id
                        ...on MediaImage {
                          image {
                            id
                            url
                          }
                        }
                      }
                    }
                  }
                  metafields {
                    edges {
                      node {
                        id
                        namespace
                        key
                        value
                        definition {
                          name
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
    """
  ) {
    bulkOperation {
      id
      status
    }
    userErrors {
      field
      message
    }
  }
}

Hey @Team_SureDone,

Thanks for sharing those details. Looking at the response you received, I do see it did return partial data, and since this is only affecting a specific store, there may be something with one of those specific resources that’s causing the error (likely a timeout).

Looking at the last line of the partial data file returned can give clues to pinpoint where it has failed.

From there, test by removing some fields to see if it proceeds, to narrow down the troublesome resource further. https://shopify.dev/docs/api/usage/bulk-operations/queries#operation-failures

If you continue to run in to failures after that, I’d recommend getting in touch with our support teams so they can take a look at those specific runs and see where the issue is.

Hey! Did the above help at all or have you had to reach out to our support teams?

Hi Kyle I’ve already reach your support team and I’m getting help from there, thanks.
We tried playing asking for different fields on the queries and I discovered that looks to berelated with some data inside variations, it could be metafields or could be another thing but is always failing at the same point. Still trying to find the reason

Thanks for confirming you’re getting help there. They should be able to help you narrow that down.