# Elasticsearch hangs

**URL:** https://discuss.elastic.co/t/elasticsearch-hangs/8248
**Category:** Elasticsearch
**Created:** [June 28, 2012, 9:37am UTC](https://discuss.elastic.co/t/elasticsearch-hangs/8248 "2012-06-28T09:37:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Weiwei\_Wang](https://avatars.discourse-cdn.com/v4/letter/w/b19c9b/32.png) [@Weiwei\_Wang](https://discuss.elastic.co/u/Weiwei_Wang)
#### Post date: [June 28, 2012, 9:37am UTC](https://discuss.elastic.co/t/elasticsearch-hangs/8248/1 "2012-06-28T09:37:06Z")

</div>

hi,all,

- \*I have 4 es node with 32 shard 1 replica, each with 8G memory. my  
elasticsearch version is elasticsearch-0.18.5.  
I start each node with command:  
nohup bin/elasticsearch -Xms8g -Xmx8g -Des.max-open-files=true  
-Dbootstrap.mlockall=true -p es.pid

and current the index size is:  
size: 35.3gb (70.7gb)  
docs: 15938184 (17506608)

from elasticsearch-head i noticed that:  
jvm: {

- pid: 17608
- version: 1.6.0\_13
- vm\_name: Java HotSpot(TM) 64-Bit Server VM
- vm\_version: 11.3-b02
- vm\_vendor: Sun Microsystems Inc.
- start\_time: 1337151263158
- mem: {
  - heap\_init: 2gb
  - heap\_init\_in\_bytes: 2147483648
  - heap\_max: 5.3gb
  - heap\_max\_in\_bytes: 5726666752
  - non\_heap\_init: 130.4mb
  - non\_heap\_init\_in\_bytes: 136773632
  - non\_heap\_max: 560mb
  - non\_heap\_max\_in\_bytes: 587202560  
}

}

from top command:  
21003 work 18 0 8879m 8.3g 9796 S 257.0 13.2 48:45.98 java

21003 is elasticsearch's pid and we can see that cpu usage is 257.0% and  
keeps around that, some time even 300+%.

every one month I have to restarted all my es nodes otherwise it will  
responses very slow and dumps a \*.hprof file.

from the index size we can see that we have only 30G around index(70 total  
with replica) and each node has 8G memeory, but es still performs very  
poorly.

how should i do to achieve better performance and avoid restarting es  
nodes(which is very frustrating)

---

<div class="post-metadata">

### Author: ![Daniel\_Schnell](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@Daniel\_Schnell](https://discuss.elastic.co/u/Daniel_Schnell)
#### Post date: [June 28, 2012, 11:20am UTC](https://discuss.elastic.co/t/elasticsearch-hangs/8248/2 "2012-06-28T11:20:53Z")

</div>

It might be worthwhile to upgrade to the latest version 0.19.7. We had a very similar problem with 0.19.3 & 0.19.4 and upgrading to 0.19.7 fixed this issue for us. Take a look at the upgrade notes, concerning upgrading from 0.18.X versions.

Regards,

Daniel.

Am 28.06.2012 um 11:37 schrieb Weiwei Wang:

> hi,all,  
> I have 4 es node with 32 shard 1 replica, each with 8G memory. my elasticsearch version is elasticsearch-0.18.5.  
> I start each node with command:  
> nohup bin/elasticsearch -Xms8g -Xmx8g -Des.max-open-files=true -Dbootstrap.mlockall=true -p es.pid
> 
> and current the index size is:  
> size: 35.3gb (70.7gb)  
> docs: 15938184 (17506608)
> 
> from elasticsearch-head i noticed that:  
> jvm: {  
> pid: 17608  
> version: 1.6.0\_13  
> vm\_name: Java HotSpot(TM) 64-Bit Server VM  
> vm\_version: 11.3-b02  
> vm\_vendor: Sun Microsystems Inc.  
> start\_time: 1337151263158  
> mem: {  
> heap\_init: 2gb  
> heap\_init\_in\_bytes: 2147483648  
> heap\_max: 5.3gb  
> heap\_max\_in\_bytes: 5726666752  
> non\_heap\_init: 130.4mb  
> non\_heap\_init\_in\_bytes: 136773632  
> non\_heap\_max: 560mb  
> non\_heap\_max\_in\_bytes: 587202560  
> }  
> }
> 
> from top command:  
> 21003 work 18 0 8879m 8.3g 9796 S 257.0 13.2 48:45.98 java
> 
> 21003 is elasticsearch's pid and we can see that cpu usage is 257.0% and keeps around that, some time even 300+%.
> 
> every one month I have to restarted all my es nodes otherwise it will responses very slow and dumps a \*.hprof file.
> 
> from the index size we can see that we have only 30G around index(70 total with replica) and each node has 8G memeory, but es still performs very poorly.
> 
> how should i do to achieve better performance and avoid restarting es nodes(which is very frustrating)

---

<div class="post-metadata">

### Author: ![Weiwei\_Wang](https://avatars.discourse-cdn.com/v4/letter/w/b19c9b/32.png) [@Weiwei\_Wang](https://discuss.elastic.co/u/Weiwei_Wang)
#### Post date: [June 28, 2012, 12:15pm UTC](https://discuss.elastic.co/t/elasticsearch-hangs/8248/3 "2012-06-28T12:15:59Z")

</div>

thanks daniel, i'm planning to do that. I'm testing my client which use  
client lib's TransportClient to connect to es cluster and find that client  
lib also need to upgrade, so I need to do a full test because we use it in  
our online product.

On Thursday, June 28, 2012 7:20:53 PM UTC+8, Daniel Schnell wrote:

> It might be worthwhile to upgrade to the latest version 0.19.7. We had a  
> very similar problem with 0.19.3 & 0.19.4 and upgrading to 0.19.7 fixed  
> this issue for us. Take a look at the upgrade notes, concerning upgrading  
> from 0.18.X versions.
> 
> Regards,
> 
> Daniel.
> 
> Am 28.06.2012 um 11:37 schrieb Weiwei Wang:
> 
> hi,all,
> 
> - \*I have 4 es node with 32 shard 1 replica, each with 8G memory. my  
> elasticsearch version is elasticsearch-0.18.5.  
> I start each node with command:  
> nohup bin/elasticsearch -Xms8g -Xmx8g -Des.max-open-files=true  
> -Dbootstrap.mlockall=true -p es.pid
> 
> and current the index size is:  
> size: 35.3gb (70.7gb)  
> docs: 15938184 (17506608)
> 
> from elasticsearch-head i noticed that:  
> jvm: {
> 
> - pid: 17608
> - version: 1.6.0\_13
> - vm\_name: Java HotSpot(TM) 64-Bit Server VM
> - vm\_version: 11.3-b02
> - vm\_vendor: Sun Microsystems Inc.
> - start\_time: 1337151263158
> - mem: {
> - heap\_init: 2gb
> - heap\_init\_in\_bytes: 2147483648
> - heap\_max: 5.3gb
> - heap\_max\_in\_bytes: 5726666752
> - non\_heap\_init: 130.4mb
> - non\_heap\_init\_in\_bytes: 136773632
> - non\_heap\_max: 560mb
> - non\_heap\_max\_in\_bytes: 587202560  
> }
> 
> }
> 
> from top command:  
> 21003 work 18 0 8879m 8.3g 9796 S 257.0 13.2 48:45.98 java
> 
> 21003 is elasticsearch's pid and we can see that cpu usage is 257.0% and  
> keeps around that, some time even 300+%.
> 
> every one month I have to restarted all my es nodes otherwise it will  
> responses very slow and dumps a \*.hprof file.
> 
> from the index size we can see that we have only 30G around index(70 total  
> with replica) and each node has 8G memeory, but es still performs very  
> poorly.
> 
> how should i do to achieve better performance and avoid restarting es  
> nodes(which is very frustrating)

---

<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, 3:22am UTC](https://discuss.elastic.co/t/elasticsearch-hangs/8248/4 "2017-07-06T03:22:09Z")

</div>


