# Elastic search giving OutOfMemory error

**URL:** <https://discuss.elastic.co/t/elastic-search-giving-outofmemory-error/16068>\
**Category:** Elasticsearch\
**Created:** [February 28, 2014, 9:12am UTC](https://discuss.elastic.co/t/elastic-search-giving-outofmemory-error/16068 "2014-02-28T09:12:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bagui](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bagui/32/960_2.png) [@bagui](https://discuss.elastic.co/u/bagui)\
**Post date:** [February 28, 2014, 9:12am UTC](https://discuss.elastic.co/t/elastic-search-giving-outofmemory-error/16068/1 "2014-02-28T09:12:25Z")

</div>

Hi,

I'm getting below exception while running elastic search using logstash . Please help on this.

[2014-02-28 11:24:29,280][DEBUG][action.search.type] [Nut] [182865] Failed to execute fetch phase  
org.elasticsearch.ElasticsearchException: Java heap space  
at org.elasticsearch.ExceptionsHelper.convertToRuntime(ExceptionsHelper.java:37)  
at org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:451)  
at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:406)  
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.executeFetch(TransportSearchQueryThenFetchAction.java:150)  
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction$2.run(TransportSearchQueryThenFetchAction.java:134)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
at java.lang.Thread.run(Thread.java:744)  
Caused by: java.lang.OutOfMemoryError: Java heap space  
at org.apache.lucene.util.packed.PackedReaderIterator.(PackedReaderIterator.java:45)  
at org.apache.lucene.util.packed.PackedInts.getReaderIteratorNoHeader(PackedInts.java:905)  
at

---

<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:46am UTC](https://discuss.elastic.co/t/elastic-search-giving-outofmemory-error/16068/2 "2017-07-06T01:46:38Z")

</div>


