Re: bulkOperationRunQuery timing at around ~23 minutes of execution

bulkOperationRunQuery timing at around ~23 minutes of execution

JustinKillian
Shopify Partner
28 0 16

Hi!

Starting Jan 9th our integration started seeing a lot more incidences (20x) on INTERNAL_SERVER errors happening on bulkOperationRunQuery for the Shopify Admin API.

Here's an example:

  {
    "data": {
        "currentBulkOperation": {
            "id": "gid://shopify/BulkOperation/2708992590125",
            "status": "FAILED",
            "url": null,
            "errorCode": "INTERNAL_SERVER_ERROR",
            "fileSize": null,
            "createdAt": "2023-01-19T23:01:18Z",
            "completedAt": null,
            "objectCount": "0",
            "rootObjectCount": "0",
            "partialDataUrl": null
        }
    },
    "extensions": {
        "cost": {
            "requestedQueryCost": 1,
            "actualQueryCost": 1,
            "throttleStatus": {
                "maximumAvailable": 2000.0,
                "currentlyAvailable": 1999,
                "restoreRate": 100.0
            }
        }
    }
}

Could you please confirm Shopify is timing out on execution of these queries? And perhaps plan for a fix (sharing ETA)? Or advise on what should we do as clients to your api on these cases?

Thanks!


Reply 1 (1)

glassit
Shopify Partner
21 1 2

Hi @JustinKillian 

 

This is Glass It, a price tracking solution with a free price history checker. That's tough because of the INTERNAL_SERVER_ERROR errorCode which is ambiguous. The "currentlyAvailable" compared to "maximumAvailable" units under "throttleStatus" seem to indicate perhaps you've reached some limit or threshold in operations allowed in the API. Maybe doing too much too fast, or the requests to the API are on a store with a different/larger number of product variants?

 

See the following for more info about the Shopify API rate limits , where they also provides some advice on avoiding the rate limited response. To get a detailed breakdown of how each field contributes to the requested cost, you can include the header 'X-GraphQL-Cost-Include-Fields': true in your request.

 

Additionally, bulk operation failures with INTERNAL_SERVER_ERROR responses indicate something went wrong on Shopify's server and they've been notified of the error. These errors might be intermittent, so you can try submitting the query again. See here for more about bulk operation failures