# Elasticsearch throws Could not reserve enough space for object heap

**URL:** <https://discuss.elastic.co/t/elasticsearch-throws-could-not-reserve-enough-space-for-object-heap/15978>\
**Category:** Elasticsearch\
**Created:** [February 23, 2014, 8:29pm UTC](https://discuss.elastic.co/t/elasticsearch-throws-could-not-reserve-enough-space-for-object-heap/15978 "2014-02-23T20:29:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mehdi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mehdi/32/1783_2.png) [@mehdi](https://discuss.elastic.co/u/mehdi)\
**Post date:** [February 23, 2014, 8:29pm UTC](https://discuss.elastic.co/t/elasticsearch-throws-could-not-reserve-enough-space-for-object-heap/15978/1 "2014-02-23T20:29:35Z")

</div>

Hi guys,

It seems that Elasticsearch stops working this morning.  
When i launch : sudo service elasticsearch start, it says : _Starting  
ElasticSearch Server Done_

But when i check the status, it gives me : _elasticsearch is not running_

I tried to launch it by the command :  
/usr/share/elasticsearch/bin/elasticsearch start  
it gives me :

_Error occurred during initialization of VM Could not reserve enough space  
for object heap_

I tried to set 512m for Heap size in :  
/usr/share/elasticsearch/bin/service/elasticsearch.conf

set.default.ES\_HOME=  
set.default.ES\_HEAP\_SIZE=512

But it didn't work.  
How could i fix that?

--  
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/60c061b5-ad47-4067-8128-0df0a0098844%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/60c061b5-ad47-4067-8128-0df0a0098844%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [February 23, 2014, 9:48pm UTC](https://discuss.elastic.co/t/elasticsearch-throws-could-not-reserve-enough-space-for-object-heap/15978/2 "2014-02-23T21:48:23Z")

</div>

What happen if you try 512m instead of 512

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 23 févr. 2014 à 21:29, Mehdi [medyo4zy@gmail.com](mailto:medyo4zy@gmail.com) a écrit :

Hi guys,

It seems that Elasticsearch stops working this morning.  
When i launch : sudo service elasticsearch start, it says : Starting ElasticSearch Server Done

But when i check the status, it gives me : elasticsearch is not running

I tried to launch it by the command : /usr/share/elasticsearch/bin/elasticsearch start  
it gives me :

Error occurred during initialization of VM  
Could not reserve enough space for object heap

I tried to set 512m for Heap size in : /usr/share/elasticsearch/bin/service/elasticsearch.conf

set.default.ES\_HOME=  
set.default.ES\_HEAP\_SIZE=512

## But it didn't work. How could i fix that?

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/60c061b5-ad47-4067-8128-0df0a0098844%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/60c061b5-ad47-4067-8128-0df0a0098844%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/A5F32701-B283-40BC-B0F5-C3C3308DC958%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/A5F32701-B283-40BC-B0F5-C3C3308DC958%40pilato.fr).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![mehdi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mehdi/32/1783_2.png) [@mehdi](https://discuss.elastic.co/u/mehdi)\
**Post date:** [February 23, 2014, 10:30pm UTC](https://discuss.elastic.co/t/elasticsearch-throws-could-not-reserve-enough-space-for-object-heap/15978/3 "2014-02-23T22:30:01Z")

</div>

Same result, i tried also this command: _rcelasticsearch console_

wrapper | Launching a JVM...  
wrapper | JVM exited while loading the application.  
jvm 1 | Error occurred during initialization of VM  
jvm 1 | Could not reserve enough space for object heap  
wrapper | Encountered an invalid numerical value for configuration  
property wrapper.java.initmemory=512m. Resolving to 512.

Le dimanche 23 février 2014 21:48:23 UTC, David Pilato a écrit :

> What happen if you try 512m instead of 512
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 23 févr. 2014 à 21:29, Mehdi \<[medy...@gmail.com](mailto:medy...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> Hi guys,
> 
> It seems that Elasticsearch stops working this morning.  
> When i launch : sudo service elasticsearch start, it says : _Starting  
> Elasticsearch Server Done_
> 
> But when i check the status, it gives me : _elasticsearch is not running_
> 
> I tried to launch it by the command :  
> /usr/share/elasticsearch/bin/elasticsearch start  
> it gives me :
> 
> _Error occurred during initialization of VM Could not reserve enough space  
> for object heap_
> 
> I tried to set 512m for Heap size in :  
> /usr/share/elasticsearch/bin/service/elasticsearch.conf
> 
> set.default.ES\_HOME=  
> set.default.ES\_HEAP\_SIZE=512
> 
> But it didn't work.  
> How could i fix that?
> 
> --  
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/60c061b5-ad47-4067-8128-0df0a0098844%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/60c061b5-ad47-4067-8128-0df0a0098844%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/4c939f90-02ba-4d5c-8ced-1161c666346a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c939f90-02ba-4d5c-8ced-1161c666346a%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [February 23, 2014, 10:45pm UTC](https://discuss.elastic.co/t/elasticsearch-throws-could-not-reserve-enough-space-for-object-heap/15978/4 "2014-02-23T22:45:05Z")

</div>

Do you have already some indexed data?  
If so, may be 512m is not enough. It's a really low value.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 23 févr. 2014 à 23:30, Mehdi [medyo4zy@gmail.com](mailto:medyo4zy@gmail.com) a écrit :

> Same result, i tried also this command: rcelasticsearch console
> 
> wrapper | Launching a JVM...  
> wrapper | JVM exited while loading the application.  
> jvm 1 | Error occurred during initialization of VM  
> jvm 1 | Could not reserve enough space for object heap  
> wrapper | Encountered an invalid numerical value for configuration property wrapper.java.initmemory=512m. Resolving to 512.
> 
> Le dimanche 23 février 2014 21:48:23 UTC, David Pilato a écrit :
> 
> > What happen if you try 512m instead of 512
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 23 févr. 2014 à 21:29, Mehdi [medy...@gmail.com](mailto:medy...@gmail.com) a écrit :
> > 
> > Hi guys,
> > 
> > It seems that Elasticsearch stops working this morning.  
> > When i launch : sudo service elasticsearch start, it says : Starting Elasticsearch Server Done
> > 
> > But when i check the status, it gives me : elasticsearch is not running
> > 
> > I tried to launch it by the command : /usr/share/elasticsearch/bin/elasticsearch start  
> > it gives me :
> > 
> > Error occurred during initialization of VM  
> > Could not reserve enough space for object heap
> > 
> > I tried to set 512m for Heap size in : /usr/share/elasticsearch/bin/service/elasticsearch.conf
> > 
> > set.default.ES\_HOME=  
> > set.default.ES\_HEAP\_SIZE=512
> > 
> > ## But it didn't work. How could i fix that?
> > 
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/60c061b5-ad47-4067-8128-0df0a0098844%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/60c061b5-ad47-4067-8128-0df0a0098844%40googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> 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/4c939f90-02ba-4d5c-8ced-1161c666346a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c939f90-02ba-4d5c-8ced-1161c666346a%40googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/58A7F705-6F19-48A0-839C-462547E5E91C%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/58A7F705-6F19-48A0-839C-462547E5E91C%40pilato.fr).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![mehdi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mehdi/32/1783_2.png) [@mehdi](https://discuss.elastic.co/u/mehdi)\
**Post date:** [February 23, 2014, 10:48pm UTC](https://discuss.elastic.co/t/elasticsearch-throws-could-not-reserve-enough-space-for-object-heap/15978/5 "2014-02-23T22:48:52Z")

</div>

Yes, Elasticsearch was deployed on the Vps 3 months ago, it worked  
perfectly, until today.

VPS config : _512MB Ram, 20GB SSD Disk_

Le dimanche 23 février 2014 22:45:05 UTC, David Pilato a écrit :

> Do you have already some indexed data?  
> If so, may be 512m is not enough. It's a really low value.
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 23 févr. 2014 à 23:30, Mehdi \<[medy...@gmail.com](mailto:medy...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> Same result, i tried also this command: _rcelasticsearch console_
> 
> wrapper | Launching a JVM...  
> wrapper | JVM exited while loading the application.  
> jvm 1 | Error occurred during initialization of VM  
> jvm 1 | Could not reserve enough space for object heap  
> wrapper | Encountered an invalid numerical value for configuration  
> property wrapper.java.initmemory=512m. Resolving to 512.
> 
> Le dimanche 23 février 2014 21:48:23 UTC, David Pilato a écrit :
> 
> > What happen if you try 512m instead of 512
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 23 févr. 2014 à 21:29, Mehdi [medy...@gmail.com](mailto:medy...@gmail.com) a écrit :
> > 
> > Hi guys,
> > 
> > It seems that Elasticsearch stops working this morning.  
> > When i launch : sudo service elasticsearch start, it says : _Starting  
> > Elasticsearch Server Done_
> > 
> > But when i check the status, it gives me : _elasticsearch is not running_
> > 
> > I tried to launch it by the command :  
> > /usr/share/elasticsearch/bin/elasticsearch start  
> > it gives me :
> > 
> > _Error occurred during initialization of VM Could not reserve enough  
> > space for object heap_
> > 
> > I tried to set 512m for Heap size in :  
> > /usr/share/elasticsearch/bin/service/elasticsearch.conf
> > 
> > set.default.ES\_HOME=  
> > set.default.ES\_HEAP\_SIZE=512
> > 
> > But it didn't work.  
> > How could i fix that?
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/60c061b5-ad47-4067-8128-0df0a0098844%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/60c061b5-ad47-4067-8128-0df0a0098844%40googlegroups.com)  
> > .  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/4c939f90-02ba-4d5c-8ced-1161c666346a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c939f90-02ba-4d5c-8ced-1161c666346a%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/65a4762f-8da3-45a5-b3ae-c59d2f01dc2d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/65a4762f-8da3-45a5-b3ae-c59d2f01dc2d%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [February 23, 2014, 10:54pm UTC](https://discuss.elastic.co/t/elasticsearch-throws-could-not-reserve-enough-space-for-object-heap/15978/6 "2014-02-23T22:54:08Z")

</div>

Best practise is to use half of system ram for your heap, so ideally you  
should be setting it to 256mb.  
However you probably want to add more system RAM as you're hitting the  
limits with what you have.

Regards,  
Mark Walkom

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

On 24 February 2014 09:48, Mehdi [medyo4zy@gmail.com](mailto:medyo4zy@gmail.com) wrote:

> Yes, Elasticsearch was deployed on the Vps 3 months ago, it worked  
> perfectly, until today.
> 
> VPS config : _512MB Ram, 20GB SSD Disk_
> 
> Le dimanche 23 février 2014 22:45:05 UTC, David Pilato a écrit :
> 
> > Do you have already some indexed data?  
> > If so, may be 512m is not enough. It's a really low value.
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 23 févr. 2014 à 23:30, Mehdi [medy...@gmail.com](mailto:medy...@gmail.com) a écrit :
> > 
> > Same result, i tried also this command: _rcelasticsearch console_
> > 
> > wrapper | Launching a JVM...  
> > wrapper | JVM exited while loading the application.  
> > jvm 1 | Error occurred during initialization of VM  
> > jvm 1 | Could not reserve enough space for object heap  
> > wrapper | Encountered an invalid numerical value for configuration  
> > property wrapper.java.initmemory=512m. Resolving to 512.
> > 
> > Le dimanche 23 février 2014 21:48:23 UTC, David Pilato a écrit :
> > 
> > > What happen if you try 512m instead of 512
> > > 
> > > --  
> > > David 😉  
> > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > 
> > > Le 23 févr. 2014 à 21:29, Mehdi [medy...@gmail.com](mailto:medy...@gmail.com) a écrit :
> > > 
> > > Hi guys,
> > > 
> > > It seems that Elasticsearch stops working this morning.  
> > > When i launch : sudo service elasticsearch start, it says : _Starting  
> > > Elasticsearch Server Done_
> > > 
> > > But when i check the status, it gives me : _elasticsearch is not  
> > > running_
> > > 
> > > I tried to launch it by the command : /usr/share/elasticsearch/bin/elasticsearch  
> > > start  
> > > it gives me :
> > > 
> > > _Error occurred during initialization of VM Could not reserve enough  
> > > space for object heap_
> > > 
> > > I tried to set 512m for Heap size in : /usr/share/elasticsearch/bin/  
> > > service/elasticsearch.conf
> > > 
> > > set.default.ES\_HOME=  
> > > set.default.ES\_HEAP\_SIZE=512
> > > 
> > > But it didn't work.  
> > > How could i fix that?
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/60c061b5-ad47-4067-8128-0df0a0098844%  
> > > [40googlegroups.com](http://40googlegroups.com).  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > msgid/elasticsearch/4c939f90-02ba-4d5c-8ced-1161c666346a%  
> > [40googlegroups.com](http://40googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > 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/65a4762f-8da3-45a5-b3ae-c59d2f01dc2d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/65a4762f-8da3-45a5-b3ae-c59d2f01dc2d%40googlegroups.com)  
> > .  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/CAEM624YGs0qirg70xwahY9yPZ0hez4h%2Bz4H4hdpmFb8T09wYoA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624YGs0qirg70xwahY9yPZ0hez4h%2Bz4H4hdpmFb8T09wYoA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![mehdi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mehdi/32/1783_2.png) [@mehdi](https://discuss.elastic.co/u/mehdi)\
**Post date:** [February 23, 2014, 11:00pm UTC](https://discuss.elastic.co/t/elasticsearch-throws-could-not-reserve-enough-space-for-object-heap/15978/7 "2014-02-23T23:00:05Z")

</div>

I tried low sizes : 256 and 128, it does not work.

The vps is only used to host Ruby on rails Api for mobile apps  
(Ruby, Postgresql, Redis...)

Le dimanche 23 février 2014 22:54:08 UTC, Mark Walkom a écrit :

> Best practise is to use half of system ram for your heap, so ideally you  
> should be setting it to 256mb.  
> However you probably want to add more system RAM as you're hitting the  
> limits with what you have.
> 
> Regards,  
> Mark Walkom
> 
> Infrastructure Engineer  
> Campaign Monitor  
> email: [ma...@campaignmonitor.com](mailto:ma...@campaignmonitor.com) \<javascript:\>  
> web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> 
> On 24 February 2014 09:48, Mehdi \<[medy...@gmail.com](mailto:medy...@gmail.com) \<javascript:\>\> wrote:
> 
> > Yes, Elasticsearch was deployed on the Vps 3 months ago, it worked  
> > perfectly, until today.
> > 
> > VPS config : _512MB Ram, 20GB SSD Disk_
> > 
> > Le dimanche 23 février 2014 22:45:05 UTC, David Pilato a écrit :
> > 
> > > Do you have already some indexed data?  
> > > If so, may be 512m is not enough. It's a really low value.
> > > 
> > > --  
> > > David 😉  
> > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > 
> > > Le 23 févr. 2014 à 23:30, Mehdi [medy...@gmail.com](mailto:medy...@gmail.com) a écrit :
> > > 
> > > Same result, i tried also this command: _rcelasticsearch console_
> > > 
> > > wrapper | Launching a JVM...  
> > > wrapper | JVM exited while loading the application.  
> > > jvm 1 | Error occurred during initialization of VM  
> > > jvm 1 | Could not reserve enough space for object heap  
> > > wrapper | Encountered an invalid numerical value for configuration  
> > > property wrapper.java.initmemory=512m. Resolving to 512.
> > > 
> > > Le dimanche 23 février 2014 21:48:23 UTC, David Pilato a écrit :
> > > 
> > > > What happen if you try 512m instead of 512
> > > > 
> > > > --  
> > > > David 😉  
> > > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > > 
> > > > Le 23 févr. 2014 à 21:29, Mehdi [medy...@gmail.com](mailto:medy...@gmail.com) a écrit :
> > > > 
> > > > Hi guys,
> > > > 
> > > > It seems that Elasticsearch stops working this morning.  
> > > > When i launch : sudo service elasticsearch start, it says : _Starting  
> > > > Elasticsearch Server Done_
> > > > 
> > > > But when i check the status, it gives me : _elasticsearch is not  
> > > > running_
> > > > 
> > > > I tried to launch it by the command : /usr/share/elasticsearch/bin/elasticsearch  
> > > > start  
> > > > it gives me :
> > > > 
> > > > _Error occurred during initialization of VM Could not reserve enough  
> > > > space for object heap_
> > > > 
> > > > I tried to set 512m for Heap size in : /usr/share/elasticsearch/bin/  
> > > > service/elasticsearch.conf
> > > > 
> > > > set.default.ES\_HOME=  
> > > > set.default.ES\_HEAP\_SIZE=512
> > > > 
> > > > But it didn't work.  
> > > > How could i fix that?
> > > > 
> > > > --  
> > > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > msgid/elasticsearch/60c061b5-ad47-4067-8128-0df0a0098844%  
> > > > [40googlegroups.com](http://40googlegroups.com).  
> > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/4c939f90-02ba-4d5c-8ced-1161c666346a%  
> > > [40googlegroups.com](http://40googlegroups.com).  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/65a4762f-8da3-45a5-b3ae-c59d2f01dc2d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/65a4762f-8da3-45a5-b3ae-c59d2f01dc2d%40googlegroups.com)  
> > > .  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/13cc5f19-e3ea-45d4-88ca-60f3e0e4550b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/13cc5f19-e3ea-45d4-88ca-60f3e0e4550b%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [February 24, 2014, 6:36am UTC](https://discuss.elastic.co/t/elasticsearch-throws-could-not-reserve-enough-space-for-object-heap/15978/8 "2014-02-24T06:36:10Z")

</div>

It can not work with less RAM.  
May be starting new nodes to have less shards per node could help but I'm guessing you don't want to do that.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 24 févr. 2014 à 00:00, Mehdi [medyo4zy@gmail.com](mailto:medyo4zy@gmail.com) a écrit :

I tried low sizes : 256 and 128, it does not work.

The vps is only used to host Ruby on rails Api for mobile apps (Ruby, Postgresql, Redis...)

Le dimanche 23 février 2014 22:54:08 UTC, Mark Walkom a écrit :

> Best practise is to use half of system ram for your heap, so ideally you should be setting it to 256mb.  
> However you probably want to add more system RAM as you're hitting the limits with what you have.
> 
> Regards,  
> Mark Walkom
> 
> Infrastructure Engineer  
> Campaign Monitor  
> email: [ma...@campaignmonitor.com](mailto:ma...@campaignmonitor.com)  
> web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> 
> > On 24 February 2014 09:48, Mehdi [medy...@gmail.com](mailto:medy...@gmail.com) wrote:  
> > Yes, Elasticsearch was deployed on the Vps 3 months ago, it worked perfectly, until today.
> > 
> > VPS config : 512MB Ram, 20GB SSD Disk
> > 
> > Le dimanche 23 février 2014 22:45:05 UTC, David Pilato a écrit :
> > 
> > > Do you have already some indexed data?  
> > > If so, may be 512m is not enough. It's a really low value.
> > > 
> > > --  
> > > David 😉  
> > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > 
> > > > Le 23 févr. 2014 à 23:30, Mehdi [medy...@gmail.com](mailto:medy...@gmail.com) a écrit :
> > > > 
> > > > Same result, i tried also this command: rcelasticsearch console
> > > > 
> > > > wrapper | Launching a JVM...  
> > > > wrapper | JVM exited while loading the application.  
> > > > jvm 1 | Error occurred during initialization of VM  
> > > > jvm 1 | Could not reserve enough space for object heap  
> > > > wrapper | Encountered an invalid numerical value for configuration property wrapper.java.initmemory=512m. Resolving to 512.
> > > > 
> > > > Le dimanche 23 février 2014 21:48:23 UTC, David Pilato a écrit :
> > > > 
> > > > > What happen if you try 512m instead of 512
> > > > > 
> > > > > --  
> > > > > David 😉  
> > > > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > > > 
> > > > > Le 23 févr. 2014 à 21:29, Mehdi [medy...@gmail.com](mailto:medy...@gmail.com) a écrit :
> > > > > 
> > > > > Hi guys,
> > > > > 
> > > > > It seems that Elasticsearch stops working this morning.  
> > > > > When i launch : sudo service elasticsearch start, it says : Starting Elasticsearch Server Done
> > > > > 
> > > > > But when i check the status, it gives me : elasticsearch is not running
> > > > > 
> > > > > I tried to launch it by the command : /usr/share/elasticsearch/bin/elasticsearch start  
> > > > > it gives me :
> > > > > 
> > > > > Error occurred during initialization of VM  
> > > > > Could not reserve enough space for object heap
> > > > > 
> > > > > I tried to set 512m for Heap size in : /usr/share/elasticsearch/bin/service/elasticsearch.conf
> > > > > 
> > > > > set.default.ES\_HOME=  
> > > > > set.default.ES\_HEAP\_SIZE=512
> > > > > 
> > > > > ## But it didn't work. How could i fix that?
> > > > > 
> > > > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/60c061b5-ad47-4067-8128-0df0a0098844%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/60c061b5-ad47-4067-8128-0df0a0098844%40googlegroups.com).  
> > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > 
> > > > --  
> > > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4c939f90-02ba-4d5c-8ced-1161c666346a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c939f90-02ba-4d5c-8ced-1161c666346a%40googlegroups.com).  
> > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/65a4762f-8da3-45a5-b3ae-c59d2f01dc2d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/65a4762f-8da3-45a5-b3ae-c59d2f01dc2d%40googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/13cc5f19-e3ea-45d4-88ca-60f3e0e4550b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/13cc5f19-e3ea-45d4-88ca-60f3e0e4550b%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/D04160A8-404A-4508-B44F-DC1D9A34B577%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/D04160A8-404A-4508-B44F-DC1D9A34B577%40pilato.fr).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:47am UTC](https://discuss.elastic.co/t/elasticsearch-throws-could-not-reserve-enough-space-for-object-heap/15978/9 "2017-07-06T01:47:59Z")

</div>


