# ES 5.1.1 spending too much time in GC

**URL:** https://discuss.elastic.co/t/es-5-1-1-spending-too-much-time-in-gc/69296
**Category:** Elasticsearch
**Created:** [December 16, 2016, 1:52pm UTC](https://discuss.elastic.co/t/es-5-1-1-spending-too-much-time-in-gc/69296 "2016-12-16T13:52:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Roland\_L](https://avatars.discourse-cdn.com/v4/letter/r/958977/32.png) [@Roland\_L](https://discuss.elastic.co/u/Roland_L)
#### Post date: [December 16, 2016, 1:52pm UTC](https://discuss.elastic.co/t/es-5-1-1-spending-too-much-time-in-gc/69296/1 "2016-12-16T13:52:28Z")

</div>

I just updated my cluster from 2.4.1. to 5.1.1 and everything went fine except that I'm seeing a lot of WARNings in the log. Basically it says' that garbage collection took too much time:

```
[2016-12-16T14:45:31,699][WARN][o.e.m.j.JvmGcMonitorService] [xxx] [gc][1166] overhead, spent [3.3s] collecting in the last [3.6s]
[2016-12-16T14:45:46,258][WARN][o.e.m.j.JvmGcMonitorService] [xxx] [gc][1178] overhead, spent [2.8s] collecting in the last [3.4s]
[2016-12-16T14:45:51,446][WARN][o.e.m.j.JvmGcMonitorService] [xxx] [gc][1180] overhead, spent [3.9s] collecting in the last [4.1s]
[2016-12-16T14:46:04,802][WARN][o.e.m.j.JvmGcMonitorService] [xxx] [gc][1190] overhead, spent [3.2s] collecting in the last [3.8s]
[2016-12-16T14:46:11,278][WARN][o.e.m.j.JvmGcMonitorService] [xxx] [gc][1191] overhead, spent [6.1s] collecting in the last [6.4s]
[2016-12-16T14:46:18,649][WARN][o.e.m.j.JvmGcMonitorService] [xxx] [gc][1195] overhead, spent [3.4s] collecting in the last [4.3s]

```

My cluster has:

- 2 data nodes with 24GB RAM, 10GB Heap for ES.
- 1 master-only node for quorum.

I never had any heap or JVM-related problems or error messages with 2.x before. Can anybody give me some pointer on why this might be happening?

I also seem to be having problems with Kibana 5.1.1 - it's running and apparently has access to Elasticsearch, because I see my previously saved objects. But if I try to get even the smallest amount of logs (like the last 5 or 10 minutes) from one of the "logstash-$DATE" indices I get a timeout after 30 seconds. Every time.

---

<div class="post-metadata">

### Author: ![Roland\_L](https://avatars.discourse-cdn.com/v4/letter/r/958977/32.png) [@Roland\_L](https://discuss.elastic.co/u/Roland_L)
#### Post date: [December 16, 2016, 3:34pm UTC](https://discuss.elastic.co/t/es-5-1-1-spending-too-much-time-in-gc/69296/2 "2016-12-16T15:34:00Z")

</div>

Okay, scratch that.

I didn't notice, that the JVM parameters moved from /etc/default/elasticsearch to /etc/elasticsearch/jvm.options and my 10G ES\_HEAP setting in the former was simply ignored.

I set the correct values in /etc/elasticsearch/jvm.options, now ES is starting with 10G heap and no GC problems.

---

<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: [January 13, 2017, 3:34pm UTC](https://discuss.elastic.co/t/es-5-1-1-spending-too-much-time-in-gc/69296/3 "2017-01-13T15:34:06Z")

</div>

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