# Elasticsearch eats my heap when auto-expanding replicas

**URL:** <https://discuss.elastic.co/t/elasticsearch-eats-my-heap-when-auto-expanding-replicas/12629>\
**Category:** Elasticsearch\
**Created:** [July 2, 2013, 11:40pm UTC](https://discuss.elastic.co/t/elasticsearch-eats-my-heap-when-auto-expanding-replicas/12629 "2013-07-02T23:40:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric\_Jain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eric_jain/32/834_2.png) [@Eric\_Jain](https://discuss.elastic.co/u/Eric_Jain)\
**Post date:** [July 2, 2013, 11:40pm UTC](https://discuss.elastic.co/t/elasticsearch-eats-my-heap-when-auto-expanding-replicas/12629/1 "2013-07-02T23:40:44Z")

</div>

I start with a single node, with ~100 small indexes (number\_of\_shards=1,  
auto\_expand\_replicas=0-1). Everything works fine.

I then start a second node on a different machine (ec2).

The first node now shows a lot of messages like:

2013-07-02 22:54:55,684 [INFO] cluster.metadata - [Crooked Man] updating  
number\_of\_replicas to [1] for indices [foo]  
2013-07-02 22:54:55,708 [INFO] cluster.metadata - [Crooked Man] [foo] auto  
expanded replicas to [1]

...while slowing down to a crawl, because it's using up all available heap  
space (1gb).

Anyone else notice this? Does elasticsearch really need 1gb+ per 100  
indexes in a cluster?

I'm running elasticsearch 0.90.2 with the elasticsearch-cloud-aws 1.12.0  
plugin.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 2:28am UTC](https://discuss.elastic.co/t/elasticsearch-eats-my-heap-when-auto-expanding-replicas/12629/2 "2017-07-06T02:28:33Z")

</div>

Closed on July 6, 2017, 2:28am UTC


