# Elastic Search JVM hung

**URL:** <https://discuss.elastic.co/t/elastic-search-jvm-hung/150323>\
**Category:** Elasticsearch\
**Created:** [September 28, 2018, 10:45am UTC](https://discuss.elastic.co/t/elastic-search-jvm-hung/150323 "2018-09-28T10:45:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![iaskdoubt](https://avatars.discourse-cdn.com/v4/letter/i/ed8c4c/32.png) [@iaskdoubt](https://discuss.elastic.co/u/iaskdoubt)\
**Post date:** [September 28, 2018, 10:45am UTC](https://discuss.elastic.co/t/elastic-search-jvm-hung/150323/1 "2018-09-28T10:45:01Z")

</div>

Hi,  
I am using elastic search to index fairly very high amount of logs nearly 20000 per second. I used Elastic search 2.2 and used the java client API for the purpose of indexing into the elastic search. We also regularly retrieve large data from the elastic search. We noticed that the JVM tends to hung often is it normal. Or could you suggest any optimizations to be done to improve the performance

---

<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:** [September 28, 2018, 10:46am UTC](https://discuss.elastic.co/t/elastic-search-jvm-hung/150323/2 "2018-09-28T10:46:19Z")

</div>

Why does it hand? Do you see evidence of long or frequent GC in the logs? What is the specification of the cluster?

---

<div class="post-metadata">

**Author:** ![iaskdoubt](https://avatars.discourse-cdn.com/v4/letter/i/ed8c4c/32.png) [@iaskdoubt](https://discuss.elastic.co/u/iaskdoubt)\
**Post date:** [September 28, 2018, 10:54am UTC](https://discuss.elastic.co/t/elastic-search-jvm-hung/150323/3 "2018-09-28T10:54:01Z")

</div>

We also tried to enable logging in elastic search but was unsuccessful in making it to work. I specified the path.logs in the yaml file but still the ES does not print out any logs

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 28, 2018, 10:56am UTC](https://discuss.elastic.co/t/elastic-search-jvm-hung/150323/4 "2018-09-28T10:56:16Z")

</div>

> [@iaskdoubt](#):
>
> We also regularly retrieve large data from the Elasticsearch

How do you do that? Are you playing by any chance with `size` option and not using the scroll API?

---

<div class="post-metadata">

**Author:** ![iaskdoubt](https://avatars.discourse-cdn.com/v4/letter/i/ed8c4c/32.png) [@iaskdoubt](https://discuss.elastic.co/u/iaskdoubt)\
**Post date:** [September 28, 2018, 11:01am UTC](https://discuss.elastic.co/t/elastic-search-jvm-hung/150323/5 "2018-09-28T11:01:48Z")

</div>

We use scroll api to retrieve information with size set to a maximum of 5000 logs

---

<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:** [October 26, 2018, 11:01am UTC](https://discuss.elastic.co/t/elastic-search-jvm-hung/150323/6 "2018-10-26T11:01:51Z")

</div>

Closed on October 26, 2018, 11:01am UTC

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