bulkOperationRunQuery is taking too long to fetch the data

We are currently utilizing the bulkOperationRunQuery to fetch bulk data from the orders connection. We use polling to receive the data. However, since last week, the response times have significantly increased. In some cases, the delay is substantial enough that our backend services (Heroku) are hitting timeout thresholds.

To work around this, we have moved the polling logic to the frontend, but even there, the response times remain unusually long, sometimes taking 40 to 60 seconds or more for a single order’s data (around 300kB data). This is a noticeable change compared to earlier performance, and it’s starting to affect our operational workflows.

Could someone please help confirm:

  1. If there are any known issues or performance degradations related to the bulkQueries on Shopify’s end?

  2. Whether there have been recent changes to API behavior or rate limits that could be contributing to this slowdown?

  3. Any recommended approaches or optimizations that might help improve fetch times?

Appreciate your help in looking into this.

Thanks

Hi @Shipul

Most likely the amount of data you’re requesting is growing in size, therefore it takes longer to retrieve.

Congrats, your merchants are most likely growing.

You shouldn’t expect the Bulk Operation API to finish in any timely manner, it’s designed to optimize for completeness, not for timing.

If it’s initialized from your app by the merchant, perhaps consider showing feedback that the job has started and they can come back or expect an email with the operation has finished.

Yes to follow up on Dylans point.

Bulk jobs are designed for getting large amounts of data, normally behind the scenes.
Couple of ideas for you here:

  1. Don’t poll the job instead use the bulk job completed webhook and use this to tell the merchant its finished Perform bulk operations with the GraphQL Admin API I use this pattern myself
  2. If you’re only getting a handful of orders you could just use the orders query directly orders - GraphQL Admin

Obviously be aware of the amount of orders you need to get here (not sure on your usecase) as that should determine bulk job or not.

2 Likes

@Shipul : at any given time only one bulkOperationRunQuery. will execute so make sure no other app is using this bulkOperationRunQuery.

Create a list of what all has changed when this was taking less time to increased time.

Make sure to cleanup shopify data and archive orders.

We haven’t changed anything on our end, but it’s good to know that the Bulk Operation API is designed to optimize completeness. We might update the flow accordingly.
Thanks