# Getting GC error from elasticsearch

**URL:** <https://discuss.elastic.co/t/getting-gc-error-from-elasticsearch/151186>\
**Category:** Elasticsearch\
**Created:** [October 5, 2018, 9:46am UTC](https://discuss.elastic.co/t/getting-gc-error-from-elasticsearch/151186 "2018-10-05T09:46:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gayathri](https://avatars.discourse-cdn.com/v4/letter/g/838e76/32.png) [@gayathri](https://discuss.elastic.co/u/gayathri)\
**Post date:** [October 5, 2018, 9:46am UTC](https://discuss.elastic.co/t/getting-gc-error-from-elasticsearch/151186/1 "2018-10-05T09:46:45Z")

</div>

Hi Team,

Kindly suggest any solutions for below errors. Our cluster is in Red state due to this:

2018-10-05T01:30:58,403][WARN][o.e.m.j.JvmGcMonitorService] [Node\_ELK] [gc][young][1301721][238872] duration [2.2s], collections [1]/[2.4s], total [2.2s]/[2.5h], memory [8.8gb]-\>[8.7gb]/[11.9gb], all\_pools {[young] [182.3mb]-\>[6.3mb]/[266.2mb]}{[survivor] [33.2mb]-\>[28mb]/[33.2mb]}{[old] [8.6gb]-\>[8.6gb]/[11.6gb]}

Thanks,  
Gayathri T R

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 5, 2018, 9:51am UTC](https://discuss.elastic.co/t/getting-gc-error-from-elasticsearch/151186/2 "2018-10-05T09:51:46Z")

</div>

It looks like you either need to reduce heap usage or scale up/out the cluster to increase the amount of available heap.

---

<div class="post-metadata">

**Author:** ![gayathri](https://avatars.discourse-cdn.com/v4/letter/g/838e76/32.png) [@gayathri](https://discuss.elastic.co/u/gayathri)\
**Post date:** [October 9, 2018, 1:39pm UTC](https://discuss.elastic.co/t/getting-gc-error-from-elasticsearch/151186/3 "2018-10-09T13:39:41Z")

</div>

Can you please suggest any method for that. We have already deleted many of the old indices also added below entry in jvm.options file:

-Xms12g  
-Xmx12g

Still the cluster is in RED state.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 9, 2018, 2:11pm UTC](https://discuss.elastic.co/t/getting-gc-error-from-elasticsearch/151186/4 "2018-10-09T14:11:42Z")

</div>

What is the full output of the [cluster stats API](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-stats.html)?

---

<div class="post-metadata">

**Author:** ![gayathri](https://avatars.discourse-cdn.com/v4/letter/g/838e76/32.png) [@gayathri](https://discuss.elastic.co/u/gayathri)\
**Post date:** [October 10, 2018, 11:11am UTC](https://discuss.elastic.co/t/getting-gc-error-from-elasticsearch/151186/5 "2018-10-10T11:11:37Z")

</div>

{  
"\_nodes" : {  
"total" : 5,  
"successful" : 5,  
"failed" : 0  
},  
"cluster\_name" : "elasticsearch",  
"timestamp" : 1539169452721,  
"status" : "red",  
"indices" : {  
"count" : 144,  
"shards" : {  
"total" : 1308,  
"primaries" : 654,  
"replication" : 1.0,  
"index" : {  
"shards" : {  
"min" : 2,  
"max" : 10,  
"avg" : 9.083333333333334  
},  
"primaries" : {  
"min" : 1,  
"max" : 5,  
"avg" : 4.541666666666667  
},  
"replication" : {  
"min" : 1.0,  
"max" : 1.0,  
"avg" : 1.0  
}  
}  
},  
"docs" : {  
"count" : 2166302612,  
"deleted" : 89112  
},  
"store" : {  
"size" : "3.8tb",  
"size\_in\_bytes" : 4260628672944,  
"throttle\_time" : "0s",  
"throttle\_time\_in\_millis" : 0  
},  
"fielddata" : {  
"memory\_size" : "3mb",  
"memory\_size\_in\_bytes" : 3221816,  
"evictions" : 0  
},  
"query\_cache" : {  
"memory\_size" : "164.6mb",  
"memory\_size\_in\_bytes" : 172660032,  
"total\_count" : 432127,  
"hit\_count" : 276429,  
"miss\_count" : 155698,  
"cache\_size" : 3291,  
"cache\_count" : 7320,  
"evictions" : 4029  
},  
"completion" : {  
"size" : "0b",  
"size\_in\_bytes" : 0  
},  
"segments" : {  
"count" : 28697,  
"memory" : "12.5gb",  
"memory\_in\_bytes" : 13500790812,  
"terms\_memory" : "10.8gb",  
"terms\_memory\_in\_bytes" : 11634669923,  
"stored\_fields\_memory" : "1.1gb",  
"stored\_fields\_memory\_in\_bytes" : 1221563432,  
"term\_vectors\_memory" : "0b",  
"term\_vectors\_memory\_in\_bytes" : 0,  
"norms\_memory" : "38.8kb",  
"norms\_memory\_in\_bytes" : 39744,  
"points\_memory" : "479.5mb",  
"points\_memory\_in\_bytes" : 502887001,  
"doc\_values\_memory" : "135mb",  
"doc\_values\_memory\_in\_bytes" : 141630712,  
"index\_writer\_memory" : "26.9mb",  
"index\_writer\_memory\_in\_bytes" : 28298900,  
"version\_map\_memory" : "294.8kb",  
"version\_map\_memory\_in\_bytes" : 301902,  
"fixed\_bit\_set" : "0b",  
"fixed\_bit\_set\_memory\_in\_bytes" : 0,  
"max\_unsafe\_auto\_id\_timestamp" : 1539129606492,  
"file\_sizes" : { }  
}  
},  
"nodes" : {  
"count" : {  
"total" : 5,  
"data" : 3,  
"coordinating\_only" : 0,  
"master" : 3,  
"ingest" : 5  
},  
"versions" : [  
"5.0.2"  
],  
"os" : {  
"available\_processors" : 14,  
"allocated\_processors" : 14,  
"names" : [  
{  
"name" : "Linux",  
"count" : 5  
}  
],  
"mem" : {  
"total" : "53.9gb",  
"total\_in\_bytes" : 57920278528,  
"free" : "928.1mb",  
"free\_in\_bytes" : 973279232,  
"used" : "53gb",  
"used\_in\_bytes" : 56946999296,  
"free\_percent" : 2,  
"used\_percent" : 98  
}  
},  
"process" : {  
"cpu" : {  
"percent" : 45  
},  
"open\_file\_descriptors" : {  
"min" : 269,  
"max" : 1380,  
"avg" : 894  
}  
},  
"jvm" : {  
"max\_uptime" : "20.2d",  
"max\_uptime\_in\_millis" : 1747150459,  
"versions" : [  
{  
"version" : "1.8.0\_181",  
"vm\_name" : "OpenJDK 64-Bit Server VM",  
"vm\_version" : "25.181-b13",  
"vm\_vendor" : "Oracle Corporation",  
"count" : 5  
}  
],  
"mem" : {  
"heap\_used" : "24gb",  
"heap\_used\_in\_bytes" : 25779717504,  
"heap\_max" : "43.8gb",  
"heap\_max\_in\_bytes" : 47122612224  
},  
"threads" : 291  
},  
"fs" : {  
"total" : "48.1tb",  
"total\_in\_bytes" : 52896775233536,  
"free" : "27.6tb",  
"free\_in\_bytes" : 30373739638784,  
"available" : "27.6tb",  
"available\_in\_bytes" : 30368552226816,  
"spins" : "true"  
},  
"plugins" : [  
{  
"name" : "x-pack",  
"version" : "5.0.2",  
"description" : "Elasticsearch Expanded Pack Plugin",  
"classname" : "org.elasticsearch.xpack.XPackPlugin"  
}  
],  
"network\_types" : {  
"transport\_types" : {  
"netty4" : 5  
},  
"http\_types" : {  
"netty4" : 5  
}  
}  
}  
}

Getting below error in Logs:

[2018-10-10T03:50:11,257][INFO][o.e.m.j.JvmGcMonitorService] [Node1] [gc][1744865] overhead, spent [411ms] collecting in the last [1s]  
[2018-10-10T03:50:12,262][INFO][o.e.m.j.JvmGcMonitorService] [Node1] [gc][1744866] overhead, spent [365ms] collecting in the last [1s]  
[2018-10-10T03:50:13,263][INFO][o.e.m.j.JvmGcMonitorService] [Node1] [gc][1744867] overhead, spent [329ms] collecting in the last [1s]  
[2018-10-10T03:50:34,266][INFO][o.e.m.j.JvmGcMonitorService] [Node1] [gc][1744888] overhead, spent [296ms] collecting in the last [1s]

---

<div class="post-metadata">

**Author:** ![gayathri](https://avatars.discourse-cdn.com/v4/letter/g/838e76/32.png) [@gayathri](https://discuss.elastic.co/u/gayathri)\
**Post date:** [October 11, 2018, 7:54am UTC](https://discuss.elastic.co/t/getting-gc-error-from-elasticsearch/151186/6 "2018-10-11T07:54:20Z")

</div>

Team,

Kindly help us on the above.

---

<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:** [November 8, 2018, 7:54am UTC](https://discuss.elastic.co/t/getting-gc-error-from-elasticsearch/151186/7 "2018-11-08T07:54:21Z")

</div>

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