GraphQL Bulk Operation TIMEOUT on Customers Query (Shopify Plus)

Hi everyone,

I am currently struggling with a persistent TIMEOUT error on the customers Bulk Operation endpoint.

Context

My company operates 5 Shopify Plus stores with nearly identical configurations. We use Python workflows to fetch data via the Bulk API for analysis in BigQuery.

  • The logic works perfectly on 4 out of 5 stores, even when fetching 3+ years of history.

  • On the 5th store, the operation consistently fails with a TIMEOUT error, even after significantly reducing the query complexity.

Environment

  • Admin API Version : 2025-10

  • Resource : customers

The query

I have stripped the query down to the bare minimum (removing all orders connections and other nested fields), but the issue persists. Here is the template used (where FILTER_PLACEHOLDER is replaced by an updatedAt lower bound) :

Also note that we only have around 5 metafields maximum per customer (Not as if we had 300…).

CUSTOMERS_BULK_QUERY_TEMPLATE = """{
  customers(query: "FILTER_PLACEHOLDER") { edges { node {
    id
    createdAt
    updatedAt
    tags
    verifiedEmail
    numberOfOrders
    amountSpent {
      amount
      currencyCode
    }
    defaultAddress {
      countryCodeV2
      city
      zip
    }
    statistics {
      predictedSpendTier
      rfmGroup
    }
    metafields {
      edges {
        node {
          key
          namespace
          value
        }
      }
    }
    defaultEmailAddress {
      emailAddress
    }
  }}}
}"""

Behaviour I see

I have been monitoring the bulk operation status minute-by-minute. Here is the behavior I am seeing :

  1. Initial speed : The operation starts well, parsing 5k to 15k customers per minute.

  2. Stalling : It hits a specific “sticking point” where it processes nothing for about 2 minutes.

  3. Then… : It sometimes resumes briefly, but eventually hits another snag and crashes with a TIMEOUT.

  4. Consistency: This happens regardless of the date range (tested with 2022, 2023, and 2024, 2025 start dates).

Since this is the Bulk API and I have removed nested connections, I don’t believe this should be hitting query cost limits. It behaves as if it is choking on specific data nodes.

Logs & Request IDs

Here are the details for a few failed attempts.

Example 1 : Runs then fails

The operation was running successfully, then timed out shortly after.

X-Request-ID: 866fc97a-51ca-4698-a6cf-5f0fc2db8cb3-1767169706
Status Code: 200
Bulk ID: gid://shopify/BulkOperation/8425689514331
Status: RUNNING
Count: 27898

…moments later…

X-Request-ID: e8d3902a-5f92-4403-a3bb-ecdfa5d838ba-1767169994
Status Code: 200
Bulk ID: gid://shopify/BulkOperation/8425689514331
Status: FAILED
Error: TIMEOUT
Count: 27882

Example 2 : Launch this morning

This operation stalled at count 48 844 for over 5 minutes.

X-Request-ID: e7b0ffec-e556-40af-a161-f713990454cc-1767170326
Bulk ID: gid://shopify/BulkOperation/8425974956379
Status: CREATED (Then stalled during processing)

Example 3 : Previous failures

# Failure A
Timestamp: 2025-12-31T07:01:08Z
ID: gid://shopify/BulkOperation/8425082880347
Status: FAILED | Error: TIMEOUT | Count: 38720

# Failure B
Timestamp: 2025-12-31T06:31:07Z
ID: gid://shopify/BulkOperation/8424878473563
Status: FAILED | Error: TIMEOUT | Count: 49025

Hypothesis

I suspect there may be a data integrity issue, perhaps a few customer records on this specific store have malformed data that causes the bulk parser to hang.

Unfortunately, I have no way to audit this from my end.

I have already aggressively reduced query complexity and narrowed the date ranges, so I do not believe this is a standard complexity issue.

Given that our orders bulk query (which is far more complex with nested connections) successfully retrieves millions of lines on this same store, it is baffling that the customers endpoint struggles with significantly less data.

Could a Shopify Engineer please review the Request IDs above to see if there is an underlying server-side error or a specific bad record causing the timeout?

Thank you for your help.

You’re right to suspect a specific bad record or data integrity issue on that particular store, especially since the `orders` bulk query works and you’ve already simplified the `customers` query so much. That stalling behavior and consistent timeout at a certain count is a classic symptom of the bulk operation hitting something it can’t parse or process efficiently in a specific customer’s data structure.

Given that you’ve got `X-Request-ID` and `Bulk ID`s, your best bet is to open a ticket with Shopify Support directly. Provide them all the details you’ve shared here, especially those IDs and timestamps. They have access to the internal logs for those bulk operations and can often pinpoint the exact customer `gid` or data field that’s causing the parser to hang up or timeout on their end. It’s usually something subtle like a malformed JSON string in a metafield, an unexpected character, or a very large single field value.

If for some reason Support can’t immediately identify it, you could try an aggressive binary search approach yourself. Start by querying a much smaller, non-overlapping `updatedAt` range (e.g., just one month or even a week) to see if you can successfully extract any segment of customers. If you can, keep expanding the range until it fails. If it fails even on a small range, try to narrow down the `updatedAt` filter until you find the smallest range that still causes the timeout. This might help you isolate the timeframe where the problematic customer record was last updated. Also, as a last resort, try removing the `metafields` block entirely from your query, then `defaultAddress`, then `statistics` one by one, to see if one of those specific connections is the actual culprit even with minimal fields.

Hope that helps!

Hi @youssefhe5,

I already opened 2 tickets (1 pending).

The issue for now is that support only tells me “You should try to simplify your query”, which is a nonsense.

I decided to post here directly in case we could find a solution that can guide more than just me.

Issue I found with the progressive approach, going progressively into the past is that the “updatedAt” field gets updated too often. Any change on customer info will upgrade his updatedAt cursor to now, which will take too much time to analyse myself when there is a support here to help. :confused:

The 2026-01 update on 5 bulk per app per store will help launching mini apps that work on parallel to production bulks.

Thank you for your answer though !

Hi @O-Pall1 :waving_hand:
When you have this much technical detail you may be better of copying/posting on the actual dev forums as there’s a waaaay better chance of an actual response from an actual shopify-dev; READ: chance not guarantee.
The merchant forums are peer-to-peer, shopify-support has pretty much pulled stakes on such things, and the whole place has devolved into pretty much an AI slop harvesting fest.


Thoughts,
If your a PLUS store , even if it lacks an MSM, the store owner should be raging at support to get something more than stock answers that any chatbot could provide.
5 figure payment just to get told “simplify your query” yeeesh.

Is the 5th store on a different timezone?
Is there some other external setup that is different that the other 5, even like customer tagging complexity, etc is it the oldest store, etc etc.
After that it’s an internal issue at shopify and your gonna waste time having randoms on the internet guess at the problem besides offering checklists of diagnostics/bisects.

Is there some process retouching every single customer account, e.g. some automation retagging customer with days-since-last-purchase-XX etc etc etc

A stint can be to instead make your own tagging| last-processed-date scheme for processing taggable resources.
Or metafields on those resources that allow metafields as a query parameter.
Through which you stop using the updatedAt which as you’ve found is VERY arbitrary.
:thinking: and even if updatedAt is used for sync’ing this type of behavior could be viewed as only being good for remediation of missed webhooks.
Goodluck.

Hi @PaulNewton ,

You’re right indeed, I missed the right forum. :smiley:

And I also just noticed that @youssefhe5 just posted a random AI generated message. :smiley:


Some updates if it can help someone.

Shopify’s support told me there might be performance issues because I try to get too many fields including :

  • Statistics fields : According to the support guy, those fields are calculated on extraction demand, they are not prewritten “CHAMPION”, “ALMOST_LOST”, etc… When doing large bulk queries, it could make the query crash for certain users.

  • Metafields : Those fields are always a problem, whatever the Admin API endpoint you try to reach. Support guy told me to build a separate bulk query just for those Metafields, another with all the fields, then I join in BQ (which overcomplicates things for no reason).

After oversimplifying the customers flow, going from around 25 fields (which was not that much), to 15, then to 10 now, it keeps going into timeout 100% of the time.

I also tried to reduce the updated_at window progressively from 3 years to 2 months, and it keeps crashing 100% of the time.

Issue not solved yet.

Waiting for support to do their job. Whatever they said until now was totally wrong.

They say their dev will go through the logs, but the support guy randomly comes back to me with assumptions from our store that do not exist. :smiley:

Yours,

When your normal writing style is mistaken for AI, YIKES :joy:. Hate AI for this exact reason

Apologies for that then :confused:

Morning everyone,

The issue was a direct Shopify issue. Their devs came back to me and fixed the issue 2 weeks ago.

Find below the last 2 messages sent by their support :

Our engineering team has confirmed they were able to replicate the issue you reported. They’ve identified that the problem is related to how the SQL query optimizer selects database indexes for customer bulk operations.

They’re currently working on changes to address this, specifically around how queries with **updated_at** filters are processed. I don’t have an exact timeline for when this will be deployed, but it’s actively being worked on.

I appreciate the frustration this has cause, especially given how long you’ve been dealing with it and the fact that your other 4 stores work fine. I really appreciate your patience and the detailed information you provided, it was essential in helping the team track this down.

Then last message :

The PR with the changes to the SQL optimiser has deployed. You should be able to run the queries above without getting any timeouts.

I then reprocessed the customers flow, enriched it back with all the fields I previously removed (RFM kpis, orders nodes, etc…).

It has been working 100% of the time since Shopify’s fix.

Cya,