# Elasticsearch master node times out during cluster recovery stage due to heavy GC

**URL:** <https://discuss.elastic.co/t/elasticsearch-master-node-times-out-during-cluster-recovery-stage-due-to-heavy-gc/18080>\
**Category:** Elasticsearch\
**Created:** [June 12, 2014, 10:54pm UTC](https://discuss.elastic.co/t/elasticsearch-master-node-times-out-during-cluster-recovery-stage-due-to-heavy-gc/18080 "2014-06-12T22:54:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hrishikesh\_prabhune](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@hrishikesh\_prabhune](https://discuss.elastic.co/u/hrishikesh_prabhune)\
**Post date:** [June 12, 2014, 10:54pm UTC](https://discuss.elastic.co/t/elasticsearch-master-node-times-out-during-cluster-recovery-stage-due-to-heavy-gc/18080/1 "2014-06-12T22:54:01Z")

</div>

I have a huge elasticsearch cluster with 18 nodes each having a jvm heap  
size of 25gb. The cluster holds total of 182 timestamped indices. Each  
index has approximately 1500 aliases.  
Whenever I do a full cluster restart the master node goes into massive  
garbage collection and is not able to recover indices into the cluster  
state. As a result the cluster state shows:  
"cluster\_name" : "ES\_cluster",  
"status" : "red",  
"timed\_out" : false,  
"number\_of\_nodes" : 18,  
"number\_of\_data\_nodes" : 18,  
"active\_primary\_shards" : 0,  
"active\_shards" : 0,  
"relocating\_shards" : 0,  
"initializing\_shards" : 0,  
"unassigned\_shards" : 0

After sometime the ping timeouts kicks in and the master node is dropped  
from the cluster and is unable to rejoin it again. After it has dropped  
from the cluster a new master is elected and then it also goes into massive  
garbage collection. It seems that too many aliases are causing the cluster  
state to explode.  
I think my problem is similar to this question:  
[http://elasticsearch-users.115913.n3.nabble.com/Multiple-cluster-state-copies-in-memory-VS-many-aliases-td4046417.html](http://elasticsearch-users.115913.n3.nabble.com/Multiple-cluster-state-copies-in-memory-VS-many-aliases-td4046417.html)

I am using ES version : 1.2.1 , Java version : 1.8.0\_05

Does anyone know how to get around the 'too many aliases' problem without  
deleting the aliases?

Thanks in advance!

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/072f84f1-f12d-42ab-809d-8a7d578be18d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/072f84f1-f12d-42ab-809d-8a7d578be18d%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 15, 2014, 10:56pm UTC](https://discuss.elastic.co/t/elasticsearch-master-node-times-out-during-cluster-recovery-stage-due-to-heavy-gc/18080/2 "2014-06-15T22:56:45Z")

</div>

Heya, I tried to simulate what you are having, and there is a quick fix that makes a big difference, see more here: [Better default size for global index -\> alias map by kimchy · Pull Request #6504 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/pull/6504). There are additional optimizations that we can make, but those will be a bit more complex.

On Jun 13, 2014, at 0:54, hrishikesh prabhune [hruship@gmail.com](mailto:hruship@gmail.com) wrote:

> I have a huge elasticsearch cluster with 18 nodes each having a jvm heap size of 25gb. The cluster holds total of 182 timestamped indices. Each index has approximately 1500 aliases.  
> Whenever I do a full cluster restart the master node goes into massive garbage collection and is not able to recover indices into the cluster state. As a result the cluster state shows:  
> "cluster\_name" : "ES\_cluster",  
> "status" : "red",  
> "timed\_out" : false,  
> "number\_of\_nodes" : 18,  
> "number\_of\_data\_nodes" : 18,  
> "active\_primary\_shards" : 0,  
> "active\_shards" : 0,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 0,  
> "unassigned\_shards" : 0
> 
> After sometime the ping timeouts kicks in and the master node is dropped from the cluster and is unable to rejoin it again. After it has dropped from the cluster a new master is elected and then it also goes into massive garbage collection. It seems that too many aliases are causing the cluster state to explode.  
> I think my problem is similar to this question:  
> [http://elasticsearch-users.115913.n3.nabble.com/Multiple-cluster-state-copies-in-memory-VS-many-aliases-td4046417.html](http://elasticsearch-users.115913.n3.nabble.com/Multiple-cluster-state-copies-in-memory-VS-many-aliases-td4046417.html)
> 
> I am using ES version : 1.2.1 , Java version : 1.8.0\_05
> 
> Does anyone know how to get around the 'too many aliases' problem without deleting the aliases?
> 
> Thanks in advance!
> 
> --  
> 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).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/072f84f1-f12d-42ab-809d-8a7d578be18d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/072f84f1-f12d-42ab-809d-8a7d578be18d%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/7DA18C18-42F5-4977-8052-8F7C9DBA7024%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/7DA18C18-42F5-4977-8052-8F7C9DBA7024%40gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:22am UTC](https://discuss.elastic.co/t/elasticsearch-master-node-times-out-during-cluster-recovery-stage-due-to-heavy-gc/18080/3 "2017-07-06T01:22:21Z")

</div>


