# Searching from the big index - Java heap space exception

**URL:** https://discuss.elastic.co/t/searching-from-the-big-index-java-heap-space-exception/19151
**Category:** Elasticsearch
**Created:** [August 7, 2014, 7:43pm UTC](https://discuss.elastic.co/t/searching-from-the-big-index-java-heap-space-exception/19151 "2014-08-07T19:43:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Pavel\_P](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pavel_p/32/1092_2.png) [@Pavel\_P](https://discuss.elastic.co/u/Pavel_P)
#### Post date: [August 7, 2014, 7:43pm UTC](https://discuss.elastic.co/t/searching-from-the-big-index-java-heap-space-exception/19151/1 "2014-08-07T19:43:03Z")

</div>

Hi,

I have a cluster of 3 machines - each 8 CPU and 30Gb ram.

Currently it holds the events stream from my logstash. Each day I have an  
index of 40Gb.

But, currently, if I try to search that index, then one node fails with the  
message:

Caused by: org.elasticsearch.common.util.concurrent.ExecutionError:

> java.lang.OutOfMemoryError: Java heap space

In my config I have the next:

> indices.fielddata.cache.size: "10Gb"  
> indices.cache.filter.size: "10Gb"

Also I've executed the next query:

> curl -XPUT [http://host.com:9200/\_cluster/settings](http://host.com:9200/_cluster/settings) -d '  
> {  
> "persistent" : {  
> "indices.fielddata.breaker.limit" : 40%  
> }  
> }'

However, I still met the heap error and the node stops to work.

Could someone explain, how should I organize my cluster, so it's able to  
perform such queries.

Regards,

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/0cdcc31e-ad64-4287-b505-055021e731a7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0cdcc31e-ad64-4287-b505-055021e731a7%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [August 8, 2014, 8:13am UTC](https://discuss.elastic.co/t/searching-from-the-big-index-java-heap-space-exception/19151/2 "2014-08-08T08:13:40Z")

</div>

How much data do you have in your cluster?

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 8 August 2014 05:43, Pavel P [pavel@kredito.de](mailto:pavel@kredito.de) wrote:

> Hi,
> 
> I have a cluster of 3 machines - each 8 CPU and 30Gb ram.
> 
> Currently it holds the events stream from my logstash. Each day I have an  
> index of 40Gb.
> 
> But, currently, if I try to search that index, then one node fails with  
> the message:
> 
> Caused by: org.elasticsearch.common.util.concurrent.ExecutionError:
> 
> > java.lang.OutOfMemoryError: Java heap space
> 
> In my config I have the next:
> 
> > indices.fielddata.cache.size: "10Gb"  
> > indices.cache.filter.size: "10Gb"
> 
> Also I've executed the next query:
> 
> > curl -XPUT [http://host.com:9200/\_cluster/settings](http://host.com:9200/_cluster/settings) -d '  
> > {  
> > "persistent" : {  
> > "indices.fielddata.breaker.limit" : 40%  
> > }  
> > }'
> 
> However, I still met the heap error and the node stops to work.
> 
> Could someone explain, how should I organize my cluster, so it's able to  
> perform such queries.
> 
> Regards,
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/0cdcc31e-ad64-4287-b505-055021e731a7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0cdcc31e-ad64-4287-b505-055021e731a7%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/0cdcc31e-ad64-4287-b505-055021e731a7%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/0cdcc31e-ad64-4287-b505-055021e731a7%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEM624b2mF03CUuLYyeRBeinMgo%2BAnT0f6%2B9Xxpcx%3D%2BpdHtYgw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624b2mF03CUuLYyeRBeinMgo%2BAnT0f6%2B9Xxpcx%3D%2BpdHtYgw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Pavel\_P](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pavel_p/32/1092_2.png) [@Pavel\_P](https://discuss.elastic.co/u/Pavel_P)
#### Post date: [August 8, 2014, 8:18am UTC](https://discuss.elastic.co/t/searching-from-the-big-index-java-heap-space-exception/19151/3 "2014-08-08T08:18:30Z")

</div>

Hi Mark,

It seems that message was queued and appeared after I created the same one:  
[https://groups.google.com/forum/?utm\_medium=email&utm\_source=footer#!msg/elasticsearch/jbHg99gqRf0/ObA9PSNwZ28J](https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/elasticsearch/jbHg99gqRf0/ObA9PSNwZ28J)

Could you go there, please?

We have 290Gb in the cluster currently.

On Fri, Aug 8, 2014 at 11:13 AM, Mark Walkom [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
wrote:

> How much data do you have in your cluster?
> 
> Regards,  
> Mark Walkom
> 
> Infrastructure Engineer  
> Campaign Monitor  
> email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
> web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> 
> On 8 August 2014 05:43, Pavel P [pavel@kredito.de](mailto:pavel@kredito.de) wrote:
> 
> > Hi,
> > 
> > I have a cluster of 3 machines - each 8 CPU and 30Gb ram.
> > 
> > Currently it holds the events stream from my logstash. Each day I have an  
> > index of 40Gb.
> > 
> > But, currently, if I try to search that index, then one node fails with  
> > the message:
> > 
> > Caused by: org.elasticsearch.common.util.concurrent.ExecutionError:
> > 
> > > java.lang.OutOfMemoryError: Java heap space
> > 
> > In my config I have the next:
> > 
> > > indices.fielddata.cache.size: "10Gb"  
> > > indices.cache.filter.size: "10Gb"
> > 
> > Also I've executed the next query:
> > 
> > > curl -XPUT [http://host.com:9200/\_cluster/settings](http://host.com:9200/_cluster/settings) -d '  
> > > {  
> > > "persistent" : {  
> > > "indices.fielddata.breaker.limit" : 40%  
> > > }  
> > > }'
> > 
> > However, I still met the heap error and the node stops to work.
> > 
> > Could someone explain, how should I organize my cluster, so it's able to  
> > perform such queries.
> > 
> > Regards,
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).
> > 
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/0cdcc31e-ad64-4287-b505-055021e731a7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0cdcc31e-ad64-4287-b505-055021e731a7%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/0cdcc31e-ad64-4287-b505-055021e731a7%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/0cdcc31e-ad64-4287-b505-055021e731a7%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/zoHHPOpyzfU/unsubscribe](https://groups.google.com/d/topic/elasticsearch/zoHHPOpyzfU/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAEM624b2mF03CUuLYyeRBeinMgo%2BAnT0f6%2B9Xxpcx%3D%2BpdHtYgw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624b2mF03CUuLYyeRBeinMgo%2BAnT0f6%2B9Xxpcx%3D%2BpdHtYgw%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAEM624b2mF03CUuLYyeRBeinMgo%2BAnT0f6%2B9Xxpcx%3D%2BpdHtYgw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAEM624b2mF03CUuLYyeRBeinMgo%2BAnT0f6%2B9Xxpcx%3D%2BpdHtYgw%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--

_Pavel Polyakov_

Software Engineer - PHP team

E-mail: [pavel@kredito.de](mailto:pavel@kredito.de)  
Skype: pavel.polyakov.x1

[https://www.facebook.com/kreditech](https://www.facebook.com/kreditech)  
Kreditech Holding SSL GmbH  
Am Sandtorkai 50, 20457 Hamburg, Germany  
Office phone: +49 (0)40 - 605905-60  
Authorized representatives: Sebastian Diemer, Alexander Graubner-Müller  
Company registration: Hamburg HRB122027

[www.kreditech.com](http://www.kreditech.com)  
[Kreditech](http://facebook.com/kreditech) [https://www.facebook.com/kreditech](https://www.facebook.com/kreditech)

[https://www.facebook.com/kreditech](https://www.facebook.com/kreditech)

This e-mail contains confidential and/or legally protected information. If  
you are not the intended recipient or if you have received this e-mail by  
error please notify the sender immediately and destroy this e-mail. Any  
unauthorized review, copying, disclosure or distribution of the material in  
this e-mail is strictly forbidden. The contents of this e-mail is legally  
binding only if it is confirmed by letter or fax. The sending of e-mails to  
us does not have any period-protecting effect. Thank you for your  
cooperation.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAFVUaqNjRobYANzBm8n5ZYqbAF-GxFhbayQyWbiOyz2gQcKJ-g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAFVUaqNjRobYANzBm8n5ZYqbAF-GxFhbayQyWbiOyz2gQcKJ-g%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:10am UTC](https://discuss.elastic.co/t/searching-from-the-big-index-java-heap-space-exception/19151/4 "2017-07-06T01:10:00Z")

</div>


