# Issue restarting Elasticsearch with mlockall = true

**URL:** <https://discuss.elastic.co/t/issue-restarting-elasticsearch-with-mlockall-true/10829>\
**Category:** Elasticsearch\
**Created:** [February 20, 2013, 10:54pm UTC](https://discuss.elastic.co/t/issue-restarting-elasticsearch-with-mlockall-true/10829 "2013-02-20T22:54:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zuhaib\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zuhaib_2/32/1896_2.png) [@zuhaib\_2](https://discuss.elastic.co/u/zuhaib_2)\
**Post date:** [February 20, 2013, 10:54pm UTC](https://discuss.elastic.co/t/issue-restarting-elasticsearch-with-mlockall-true/10829/1 "2013-02-20T22:54:36Z")

</div>

Hello,

I am running in to an issue with Elasticsearch on Ubuntu with mlockall set  
to true. If I have mlockall enabled and I go to restart elasticsearch I  
get the following error:

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

But if I do a stop and start its fine. I am using the chef cookbook to  
deploy ES and the default setting of 60% of system memory set to the ES  
java Heap (System has 15GB of ram). Something I am missing on the  
configuration to allow me to use mlockall and still restart ES? Should I  
just use 50% of the system memory?

Zuhaib

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![karmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karmi/32/44951_2.png) [@karmi](https://discuss.elastic.co/u/karmi)\
**Post date:** [February 21, 2013, 8:38am UTC](https://discuss.elastic.co/t/issue-restarting-elasticsearch-with-mlockall-true/10829/2 "2013-02-21T08:38:16Z")

</div>

> Error occurred during initialization of VM  
> Could not reserve enough space for object heap
> 
> But if I do a stop and start its fine. I am using the chef cookbook to  
> deploy ES and the default setting of 60% of system memory set to the ES  
> java Heap (System has 15GB of ram). Something I am missing on the  
> configuration to allow me to use mlockall and still restart ES? Should I  
> just use 50% of the system memory?

The restart script in the Chef cookbook [1] does just that, stop =\> start.  
What kind of system is this on? Is it a virtual machine, Vagrant?

Karel

[1] [GitHub - sous-chefs/elasticsearch: Development repository for the elasticsearch cookbook](https://github.com/elasticsearch/cookbook-elasticsearch)

--  
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).  
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, 2:50am UTC](https://discuss.elastic.co/t/issue-restarting-elasticsearch-with-mlockall-true/10829/3 "2017-07-06T02:50:23Z")

</div>


