# Reindex does not honor http.max\_content\_length: "500m",

**URL:** <https://discuss.elastic.co/t/reindex-does-not-honor-http-max-content-length-500m/158869>\
**Category:** Elasticsearch\
**Created:** [November 30, 2018, 8:27am UTC](https://discuss.elastic.co/t/reindex-does-not-honor-http-max-content-length-500m/158869 "2018-11-30T08:27:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cynosureabu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cynosureabu/32/47196_2.png) [@cynosureabu](https://discuss.elastic.co/u/cynosureabu)\
**Post date:** [November 30, 2018, 8:27am UTC](https://discuss.elastic.co/t/reindex-does-not-honor-http-max-content-length-500m/158869/1 "2018-11-30T08:27:56Z")

</div>

Reindex from 2.4 to 6.5, batch size is 200  
http.max\_content\_length: "500m",  
but still receive exception:

{"error":{"root\_cause":[{"type":"illegal\_argument\_exception","reason":"Remote responded with a chunk that was too large. Use a smaller batch size."}],"type":"illegal\_argument\_exception","reason":"Remote responded with a chunk that was too large. Use a smaller batch size.","caused\_by":{"type":"content\_too\_long\_exception","reason":"entity content is too long [114048163] for the configured buffer limit [104857600]"}},"status":400}

Any other config i could use? or its a bug?

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [November 30, 2018, 5:05pm UTC](https://discuss.elastic.co/t/reindex-does-not-honor-http-max-content-length-500m/158869/2 "2018-11-30T17:05:57Z")

</div>

I believe we [intentionally](https://github.com/elastic/elasticsearch/issues/21185) did not make this configurable though I don't have much memory of what me-from-two-years-ago was thinking. The `http.max_content_length` setting is about the server's HTTP implementation while the reindex-from-remote setting isn't really the same thing.

That 100mb limit mostly exists to prevent taking up a ton of memory during the process. That 100mb is copied a few times by reindex-from-remote because it has to build index requests and shuffle them off to the appropriate place.

Generally we recommend using a smaller batch size or skipping the large documents explicitly. I'm aware this isn't super friendly though.

---

<div class="post-metadata">

**Author:** ![cynosureabu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cynosureabu/32/47196_2.png) [@cynosureabu](https://discuss.elastic.co/u/cynosureabu)\
**Post date:** [November 30, 2018, 6:30pm UTC](https://discuss.elastic.co/t/reindex-does-not-honor-http-max-content-length-500m/158869/3 "2018-11-30T18:30:40Z")

</div>

Got it.  
IMHO ,this should become configurable. As when I am doing reindex, I mostly try to copy data to my new cluster. Our machines has 64G memory, so a default 100M is really too small.

---

<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:** [December 28, 2018, 6:30pm UTC](https://discuss.elastic.co/t/reindex-does-not-honor-http-max-content-length-500m/158869/4 "2018-12-28T18:30:41Z")

</div>

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