# \_update\_by\_query returns version\_conflict\_engine\_exception with single request

**URL:** <https://forum.opensearch.org/t/update-by-query-returns-version-conflict-engine-exception-with-single-request/28230>\
**Category:** OpenSearch\
**Tags:** troubleshoot\
**Created:** [August 1, 2026, 11:15am UTC](https://forum.opensearch.org/t/update-by-query-returns-version-conflict-engine-exception-with-single-request/28230 "2026-08-01T11:15:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Smoking\_Machine](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@Smoking\_Machine](https://forum.opensearch.org/u/Smoking_Machine)\
**Post date:** [August 1, 2026, 11:15am UTC](https://forum.opensearch.org/t/update-by-query-returns-version-conflict-engine-exception-with-single-request/28230/1 "2026-08-01T11:15:54Z")

</div>

**Versions** : 3.7.0

**Describe the issue** :

Hello folks!

- Run local cluster using the sample docker-compose from docs [Docker | OpenSearch Documentation](https://docs.opensearch.org/latest/install-and-configure/install-opensearch/docker/#sample-docker-composeyml)
- Load data that exceeds the configured memory limit, for example, а 1Gb index
- Start \_update\_by\_query operation from Dev Tools

The operation returns plenty of **version\_conflict\_engine\_exception** errors. If the index size is smaller, the query runs just fine.

**Questions:**

- Why does this happen?
- What process modifies the index during update? I’m running only a single request on a local cluster and doing nothing else.
- How can I debug this?

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [August 4, 2026, 11:41am UTC](https://forum.opensearch.org/t/update-by-query-returns-version-conflict-engine-exception-with-single-request/28230/2 "2026-08-04T11:41:26Z")

</div>

Hi @Smoking_Machine, welcome to the forum!

Could you share your full \_update\_by\_query query?

---

<div class="post-metadata">

**Author:** ![Smoking\_Machine](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@Smoking\_Machine](https://forum.opensearch.org/u/Smoking_Machine)\
**Post date:** [August 4, 2026, 8:21pm UTC](https://forum.opensearch.org/t/update-by-query-returns-version-conflict-engine-exception-with-single-request/28230/3 "2026-08-04T20:21:39Z")

</div>

Hello!

My query looks like

```auto
POST test-idx-1/_update_by_query
{
  "query": {
    "term": {
        "groups.billing_group.keyword": "forwarding"
    }
  },
  "script": {
    "source": "ctx._source.groups.billing_group = params.grp",
    "lang": "painless",
    "params": {
      "grp": "forwarding2" 
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [August 6, 2026, 1:09pm UTC](https://forum.opensearch.org/t/update-by-query-returns-version-conflict-engine-exception-with-single-request/28230/4 "2026-08-06T13:09:04Z")

</div>

@Smoking_Machine Did you consider using sroll\_size and slices?  
I’ve tested with a 3 GB index and 46K documents and I’ve got all documents updated without version conflicts.

i.e.

```auto
POST /test-logs/_update_by_query?slices=10&scroll_size=100&conflicts=proceed&refresh=true
{
  "query": {
    "match_all": {}
  },
  "script": {
    "source": "ctx._source.test_update_counter = 5"
  }
}

```

> **[Update By Query API](https://docs.opensearch.org/latest/api-reference/document-apis/update-by-query/)**
>
> The Update by Query API updates all documents in an index that match a specified query. You can update documents without changing their source to pick up...
