# Recovery heap usage

**URL:** <https://discuss.elastic.co/t/recovery-heap-usage/43128>\
**Category:** Elasticsearch\
**Created:** [March 1, 2016, 3:17pm UTC](https://discuss.elastic.co/t/recovery-heap-usage/43128 "2016-03-01T15:17:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaharmor](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@shaharmor](https://discuss.elastic.co/u/shaharmor)\
**Post date:** [March 1, 2016, 3:17pm UTC](https://discuss.elastic.co/t/recovery-heap-usage/43128/1 "2016-03-01T15:17:40Z")

</div>

Hi,

When doing recovery (Or moving an index between 1 node to another), the node receiving the index is getting its heap usage to 99% and than some times crashes due to OOM.

What can i do to avoid that?

The heap size is 8GB and the each shard size is around 7GB.

Also, what will happen if a shard size is bigger than the heap size? Should i simply split it to more shards?

---

<div class="post-metadata">

**Author:** ![shaharmor](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@shaharmor](https://discuss.elastic.co/u/shaharmor)\
**Post date:** [March 1, 2016, 3:35pm UTC](https://discuss.elastic.co/t/recovery-heap-usage/43128/2 "2016-03-01T15:35:29Z")

</div>

Can max\_merge\_segments help here?

---

<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:** [July 5, 2017, 11:12pm UTC](https://discuss.elastic.co/t/recovery-heap-usage/43128/3 "2017-07-05T23:12:26Z")

</div>


