# Out of space Exception Java Heap

**URL:** <https://discuss.elastic.co/t/out-of-space-exception-java-heap/5555>\
**Category:** Elasticsearch\
**Created:** [October 11, 2011, 6:17am UTC](https://discuss.elastic.co/t/out-of-space-exception-java-heap/5555 "2011-10-11T06:17:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kartavya](https://avatars.discourse-cdn.com/v4/letter/k/65b543/32.png) [@Kartavya](https://discuss.elastic.co/u/Kartavya)\
**Post date:** [October 11, 2011, 6:17am UTC](https://discuss.elastic.co/t/out-of-space-exception-java-heap/5555/1 "2011-10-11T06:17:51Z")

</div>

Hi

My index is around 6GB in size when I run few queries. I am getting Java  
heap out of space error.  
I know that somewhere I have made some mistake.

Please help to find me the error.

Thanks.

Regards,  
Pulkit Agrawal

---

<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:** [October 11, 2011, 9:19am UTC](https://discuss.elastic.co/t/out-of-space-exception-java-heap/5555/2 "2011-10-11T09:19:38Z")

</div>

Same answer as for your last post.  
What is your config in term of memory, shards, nodes ?

How "big" are your documents (number of fields, nested documents, ???)

Le 11 octobre 2011 à 08:17, Pulkit Agrawal [pulkitdotcom@gmail.com](mailto:pulkitdotcom@gmail.com) a écrit :

> Hi
> 
> My index is around 6GB in size when I run few queries. I am getting Java  
> heap out of space error.  
> I know that somewhere I have made some mistake.
> 
> Please help to find me the error.
> 
> Thanks.
> 
> Regards,  
> Pulkit Agrawal  
> --  
> David Pilato  
> [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> Twitter : @dadoonet

---

<div class="post-metadata">

**Author:** ![Kartavya](https://avatars.discourse-cdn.com/v4/letter/k/65b543/32.png) [@Kartavya](https://discuss.elastic.co/u/Kartavya)\
**Post date:** [October 11, 2011, 9:34am UTC](https://discuss.elastic.co/t/out-of-space-exception-java-heap/5555/3 "2011-10-11T09:34:41Z")

</div>

Thanks David for your reply

I haven't define any configuration for memory, shards, nodes explicitly. I  
am using default configuration.  
My document size is around 20 fields and no nested document.

Index created as follows

curl -XPUT 'localhost:9200/\_river/pa\_index2/\_meta' -d '{  
"type": "couchdb",  
"couchdb" : {  
"host" : "localhost",  
"port": 5984,  
"db" : "p\_tweet\_db"  
},  
"index" : {  
"index" : "pa\_index2",  
"type" : "pa\_index\_feed2",  
"bulk\_size" : "100",  
"bulk\_timeout" : "10ms"}  
}'

Regards,  
Pulkit Agrawal

On Tue, Oct 11, 2011 at 2:49 PM, [david@pilato.fr](mailto:david@pilato.fr) [david@pilato.fr](mailto:david@pilato.fr) wrote:

> \*\*
> 
> Same answer as for your last post.
> 
> What is your config in term of memory, shards, nodes ?
> 
> How "big" are your documents (number of fields, nested documents, ???)
> 
> Le 11 octobre 2011 à 08:17, Pulkit Agrawal [pulkitdotcom@gmail.com](mailto:pulkitdotcom@gmail.com) a  
> écrit :
> 
> > Hi
> > 
> > My index is around 6GB in size when I run few queries. I am getting Java  
> > heap out of space error.  
> > I know that somewhere I have made some mistake.
> > 
> > Please help to find me the error.
> > 
> > Thanks.
> > 
> > Regards,  
> > Pulkit Agrawal
> 
> --  
> David Pilato  
> [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> Twitter : @dadoonet

---

<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:** [October 11, 2011, 9:56am UTC](https://discuss.elastic.co/t/out-of-space-exception-java-heap/5555/4 "2011-10-11T09:56:49Z")

</div>

So you can't ask ES to make miracles 😉

Define your memory settings to provide at least 4gb for your node and see if you have better results.

If you are developping your software based on ES, it's not perhaps a good idea to work with 3 million docs.  
If you are testing your production platform, add more nodes and memory.

HTH  
David 😉

Le 11 oct. 2011 à 11:34, Pulkit Agrawal [pulkitdotcom@gmail.com](mailto:pulkitdotcom@gmail.com) a écrit :

> Thanks David for your reply
> 
> I haven't define any configuration for memory, shards, nodes explicitly. I am using default configuration.  
> My document size is around 20 fields and no nested document.
> 
> Index created as follows
> 
> curl -XPUT 'localhost:9200/\_river/pa\_index2/\_meta' -d '{  
> "type": "couchdb",  
> "couchdb" : {  
> "host" : "localhost",  
> "port": 5984,  
> "db" : "p\_tweet\_db"  
> },  
> "index" : {  
> "index" : "pa\_index2",  
> "type" : "pa\_index\_feed2",  
> "bulk\_size" : "100",  
> "bulk\_timeout" : "10ms"}  
> }'
> 
> Regards,  
> Pulkit Agrawal
> 
> On Tue, Oct 11, 2011 at 2:49 PM, [david@pilato.fr](mailto:david@pilato.fr) [david@pilato.fr](mailto:david@pilato.fr) wrote:  
> Same answer as for your last post.  
> What is your config in term of memory, shards, nodes ?
> 
> How "big" are your documents (number of fields, nested documents, ???)
> 
> Le 11 octobre 2011 à 08:17, Pulkit Agrawal [pulkitdotcom@gmail.com](mailto:pulkitdotcom@gmail.com) a écrit :
> 
> > Hi
> > 
> > My index is around 6GB in size when I run few queries. I am getting Java  
> > heap out of space error.  
> > I know that somewhere I have made some mistake.
> > 
> > Please help to find me the error.
> > 
> > Thanks.
> > 
> > Regards,  
> > Pulkit Agrawal
> 
> --  
> David Pilato  
> [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> Twitter : @dadoonet

---

<div class="post-metadata">

**Author:** ![Kartavya](https://avatars.discourse-cdn.com/v4/letter/k/65b543/32.png) [@Kartavya](https://discuss.elastic.co/u/Kartavya)\
**Post date:** [October 11, 2011, 10:02am UTC](https://discuss.elastic.co/t/out-of-space-exception-java-heap/5555/5 "2011-10-11T10:02:32Z")

</div>

I am running like

elasticsearch -f -Xms5g -Xmx5g

But still having the same problem.

Regards,  
Pulkit Agrawal

On Tue, Oct 11, 2011 at 3:26 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> So you can't ask ES to make miracles 😉
> 
> Define your memory settings to provide at least 4gb for your node and see  
> if you have better results.
> 
> If you are developping your software based on ES, it's not perhaps a good  
> idea to work with 3 million docs.  
> If you are testing your production platform, add more nodes and memory.
> 
> HTH  
> David 😉
> 
> Le 11 oct. 2011 à 11:34, Pulkit Agrawal [pulkitdotcom@gmail.com](mailto:pulkitdotcom@gmail.com) a écrit :
> 
> Thanks David for your reply
> 
> I haven't define any configuration for memory, shards, nodes explicitly. I  
> am using default configuration.  
> My document size is around 20 fields and no nested document.
> 
> Index created as follows
> 
> curl -XPUT 'localhost:9200/\_river/pa\_index2/\_meta' -d '{  
> "type": "couchdb",  
> "couchdb" : {  
> "host" : "localhost",  
> "port": 5984,  
> "db" : "p\_tweet\_db"  
> },  
> "index" : {  
> "index" : "pa\_index2",  
> "type" : "pa\_index\_feed2",  
> "bulk\_size" : "100",  
> "bulk\_timeout" : "10ms"}  
> }'
> 
> Regards,  
> Pulkit Agrawal
> 
> On Tue, Oct 11, 2011 at 2:49 PM, [david@pilato.fr](mailto:david@pilato.fr)[david@pilato.fr](mailto:david@pilato.fr) \<[david@pilato.fr](mailto:david@pilato.fr)  
> [david@pilato.fr](mailto:david@pilato.fr)\> wrote:
> 
> > \*\*
> > 
> > Same answer as for your last post.
> > 
> > What is your config in term of memory, shards, nodes ?
> > 
> > How "big" are your documents (number of fields, nested documents, ???)
> > 
> > Le 11 octobre 2011 à 08:17, Pulkit Agrawal \< [pulkitdotcom@gmail.com](mailto:pulkitdotcom@gmail.com)  
> > [pulkitdotcom@gmail.com](mailto:pulkitdotcom@gmail.com)\> a écrit :
> > 
> > > Hi
> > > 
> > > My index is around 6GB in size when I run few queries. I am getting Java
> > 
> > > heap out of space error.  
> > > I know that somewhere I have made some mistake.
> > > 
> > > Please help to find me the error.
> > > 
> > > Thanks.
> > > 
> > > Regards,  
> > > Pulkit Agrawal
> > 
> > --  
> > David Pilato  
> > [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)[http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> > Twitter : @dadoonet

---

<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:** [October 11, 2011, 6:44pm UTC](https://discuss.elastic.co/t/out-of-space-exception-java-heap/5555/6 "2011-10-11T18:44:26Z")

</div>

Thats strange. Do you use the latest ES version ?

I suggest to use Lukass Bigdesk [1] to get some information while you  
perform facetted searches.

David.

[1] [GitHub - lukas-vlcek/bigdesk: Live charts and statistics for Elasticsearch cluster.](https://github.com/lukas-vlcek/bigdesk)

De : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)]  
De la part de Pulkit Agrawal  
Envoyé : mardi 11 octobre 2011 12:03  
À : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
Objet : Re: Out of space Exception Java Heap

I am running like

elasticsearch -f -Xms5g -Xmx5g

But still having the same problem.

Regards,

Pulkit Agrawal

On Tue, Oct 11, 2011 at 3:26 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

So you can't ask ES to make miracles 😉

Define your memory settings to provide at least 4gb for your node and see if  
you have better results.

If you are developping your software based on ES, it's not perhaps a good  
idea to work with 3 million docs.

If you are testing your production platform, add more nodes and memory.

HTH  
David 😉

Le 11 oct. 2011 à 11:34, Pulkit Agrawal [pulkitdotcom@gmail.com](mailto:pulkitdotcom@gmail.com) a écrit :

Thanks David for your reply

I haven't define any configuration for memory, shards, nodes explicitly. I  
am using default configuration.

My document size is around 20 fields and no nested document.

Index created as follows

curl -XPUT 'localhost:9200/\_river/pa\_index2/\_meta' -d '{

"type": "couchdb",

"couchdb" : {

"host" : "localhost",

"port": 5984,

"db" : "p\_tweet\_db"

},

"index" : {

"index" : "pa\_index2",

"type" : "pa\_index\_feed2",

"bulk\_size" : "100",

"bulk\_timeout" : "10ms"}

}'

Regards,

Pulkit Agrawal

On Tue, Oct 11, 2011 at 2:49 PM, [david@pilato.fr](mailto:david@pilato.fr) [david@pilato.fr](mailto:david@pilato.fr) wrote:

Same answer as for your last post.

What is your config in term of memory, shards, nodes ?

How "big" are your documents (number of fields, nested documents, ???)

Le 11 octobre 2011 à 08:17, Pulkit Agrawal [pulkitdotcom@gmail.com](mailto:pulkitdotcom@gmail.com) a écrit  
:

> Hi
> 
> My index is around 6GB in size when I run few queries. I am getting Java  
> heap out of space error.  
> I know that somewhere I have made some mistake.
> 
> Please help to find me the error.
> 
> Thanks.
> 
> Regards,  
> Pulkit Agrawal

--  
David Pilato  
[http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
Twitter : @dadoonet

---

<div class="post-metadata">

**Author:** ![Kartavya](https://avatars.discourse-cdn.com/v4/letter/k/65b543/32.png) [@Kartavya](https://discuss.elastic.co/u/Kartavya)\
**Post date:** [October 11, 2011, 7:32pm UTC](https://discuss.elastic.co/t/out-of-space-exception-java-heap/5555/7 "2011-10-11T19:32:51Z")

</div>

I am using ES 0.17.7

Ok, I will check BigDesk and update here.

Thanks

Regards,  
Pulkit Agrawal

On Wed, Oct 12, 2011 at 12:14 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> That’s strange. Do you use the latest ES version ?\*\*\*\*
> 
> I suggest to use Lukas’s Bigdesk [1] to get some information while you  
> perform facetted searches.\*\*\*\*
> 
> * * *
> 
> David.\*\*\*\*
> 
> * * *
> 
> [1] [GitHub - lukas-vlcek/bigdesk: Live charts and statistics for Elasticsearch cluster.](https://github.com/lukas-vlcek/bigdesk)\*\*\*\*
> 
> * * *
> 
> * * *
> 
> _De :_ [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [mailto:  
> [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] _De la part de_ Pulkit Agrawal  
> _Envoyé :_ mardi 11 octobre 2011 12:03  
> _À :_ [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
> _Objet :_ Re: Out of space Exception Java Heap\*\*\*\*
> 
> * * *
> 
> I am running like \*\*\*\*
> 
> * * *
> 
> elasticsearch -f -Xms5g -Xmx5g\*\*\*\*
> 
> * * *
> 
> But still having the same problem.\*\*\*\*
> 
> * * *
> 
> Regards,\*\*\*\*
> 
> Pulkit Agrawal\*\*\*\*
> 
> On Tue, Oct 11, 2011 at 3:26 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:\*\*\*\*
> 
> So you can't ask ES to make miracles ;-)\*\*\*\*
> 
> * * *
> 
> Define your memory settings to provide at least 4gb for your node and see  
> if you have better results.\*\*\*\*
> 
> * * *
> 
> If you are developping your software based on ES, it's not perhaps a good  
> idea to work with 3 million docs.\*\*\*\*
> 
> If you are testing your production platform, add more nodes and memory.\*\*\*  
> \*
> 
> HTH  
> David ;-)\*\*\*\*
> 
> Le 11 oct. 2011 à 11:34, Pulkit Agrawal [pulkitdotcom@gmail.com](mailto:pulkitdotcom@gmail.com) a écrit :
> 
> * * *
> 
> Thanks David for your reply\*\*\*\*
> 
> * * *
> 
> I haven't define any configuration for memory, shards, nodes explicitly. I  
> am using default configuration.\*\*\*\*
> 
> My document size is around 20 fields and no nested document.\*\*\*\*
> 
> * * *
> 
> Index created as follows\*\*\*\*
> 
> * * *
> 
> curl -XPUT 'localhost:9200/\_river/pa\_index2/\_meta' -d '{\*\*\*\*
> 
> "type": "couchdb",\*\*\*\*
> 
> "couchdb" : {\*\*\*\*
> 
> "host" : "localhost",\*\*\*\*
> 
> "port": 5984,\*\*\*\*
> 
> "db" : "p\_tweet\_db"\*\*\*\*
> 
> },\*\*\*\*
> 
> "index" : {\*\*\*\*
> 
> "index" : "pa\_index2",\*\*\*\*
> 
> "type" : "pa\_index\_feed2",\*\*\*\*
> 
> "bulk\_size" : "100",\*\*\*\*
> 
> "bulk\_timeout" : "10ms"}\*\*\*\*
> 
> }'\*\*\*\*
> 
> * * *
> 
> Regards,\*\*\*\*
> 
> Pulkit Agrawal\*\*\*\*
> 
> * * *
> 
> On Tue, Oct 11, 2011 at 2:49 PM, [david@pilato.fr](mailto:david@pilato.fr) [david@pilato.fr](mailto:david@pilato.fr) wrote:\*
> 
> * * *
> 
> Same answer as for your last post. \*\*\*\*
> 
> What is your config in term of memory, shards, nodes ? \*\*\*\*
> 
> * * *
> 
> How "big" are your documents (number of fields, nested documents, ???) \*\*  
> \*\*
> 
> * * *
> 
> * * *
> 
> Le 11 octobre 2011 à 08:17, Pulkit Agrawal [pulkitdotcom@gmail.com](mailto:pulkitdotcom@gmail.com) a  
> écrit : \*\*\*\*
> 
> > Hi
> > 
> > My index is around 6GB in size when I run few queries. I am getting Java  
> > heap out of space error.  
> > I know that somewhere I have made some mistake.
> > 
> > Please help to find me the error.
> > 
> > Thanks.
> > 
> > Regards,  
> > Pulkit Agrawal \*\*\*\*
> 
> --  
> David Pilato  
> [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> Twitter : @dadoonet \*\*\*\*
> 
> * * *
> 
> * * *

---

<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:52am UTC](https://discuss.elastic.co/t/out-of-space-exception-java-heap/5555/8 "2017-07-06T03:52:22Z")

</div>


