# Update index by query error large index

**URL:** <https://discuss.elastic.co/t/update-index-by-query-error-large-index/274079>\
**Category:** Elasticsearch\
**Created:** [May 26, 2021, 2:44pm UTC](https://discuss.elastic.co/t/update-index-by-query-error-large-index/274079 "2021-05-26T14:44:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roy\_Levy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roy_levy/32/61613_2.png) [@Roy\_Levy](https://discuss.elastic.co/u/Roy_Levy)\
**Post date:** [May 26, 2021, 2:44pm UTC](https://discuss.elastic.co/t/update-index-by-query-error-large-index/274079/1 "2021-05-26T14:44:48Z")

</div>

Hey,

I'm trying to update my index by query like so:

```auto
POST my_index/_update_by_query?pipeline=my_pipeline&conflicts=proceed

```

Because my index has alot of docs (nearly 40mil) the update stops after some thousand docs and I receive the message:

```auto
{"ok":false,"message":"backend closed connection"}

```

How can I allow the query to continue running past that?  
Or should I trigger alot of times?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [May 31, 2021, 8:06am UTC](https://discuss.elastic.co/t/update-index-by-query-error-large-index/274079/2 "2021-05-31T08:06:52Z")

</div>

Hey,

you probably want to run the update by query asynchronously, see [Update By Query API | Elasticsearch Guide [7.13] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/docs-update-by-query.html#docs-update-by-query-task-api)

--Alex

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 28, 2021, 8:07am UTC](https://discuss.elastic.co/t/update-index-by-query-error-large-index/274079/3 "2021-06-28T08:07:44Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
