# Can't start elasticsearch service: "Could not reserve enough space for the object heap"

**URL:** <https://discuss.elastic.co/t/cant-start-elasticsearch-service-could-not-reserve-enough-space-for-the-object-heap/9118>\
**Category:** Elasticsearch\
**Created:** [September 24, 2012, 3:01pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-service-could-not-reserve-enough-space-for-the-object-heap/9118 "2012-09-24T15:01:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lorenzo\_Dieryckx](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lorenzo_dieryckx/32/2706_2.png) [@Lorenzo\_Dieryckx](https://discuss.elastic.co/u/Lorenzo_Dieryckx)\
**Post date:** [September 24, 2012, 3:01pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-service-could-not-reserve-enough-space-for-the-object-heap/9118/1 "2012-09-24T15:01:14Z")

</div>

Hi,

I'm having trouble starting elastic on CentOS via the elasticsearch-service.  
I get the error "Could not reserve enough space for the object heap"

I must say that I'm using a pretty low memory VPS, but I think that I  
should be able to run elastic anyway.

for reference: the contents of my elasticsearch.conf:

set.default.ES\_HOME=/opt/elasticsearch/elasticsearch-0.19.3  
set.default.ES\_HEAP\_SIZE=256  
set.default.ES\_MIN\_MEM=%ES\_HEAP\_SIZE%  
set.default.ES\_MAX\_MEM=%ES\_HEAP\_SIZE%

#\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

# Wrapper Timeout Properties

#\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

# How long to wait for the JVM to start (in seconds)

wrapper.startup.timeout=300

# How long to wait for the JVM to stop (in seconds)

wrapper.shutdown.timeout=300

# When a ping will timeout to consider the JVM hung (in seconds)

wrapper.ping.timeout=300

#\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

# Wrapper Java Properties

#\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

# Java Application

wrapper.java.command=java

# Tell the Wrapper to log the full generated Java command line.

#wrapper.java.command.loglevel=INFO

wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp

wrapper.working.dir=%ES\_HOME%

# Java Classpath (include wrapper.jar) Add class path elements as

# needed starting from 1

wrapper.java.classpath.1=%ES\_HOME%/bin/service/lib/wrapper.jar  
wrapper.java.classpath.2=%ES\_HOME%/lib/elasticsearch\*.jar  
wrapper.java.classpath.3=%ES\_HOME%/lib/_.jar  
wrapper.java.classpath.4=%ES\_HOME%/lib/sigar/_.jar

# Java Library Path (location of Wrapper.DLL or libwrapper.so)

wrapper.java.library.path.1=%ES\_HOME%/bin/service/lib

# Java Bits. On applicable platforms, tells the JVM to run in 32 or 64-bit

mode.  
wrapper.java.additional.auto\_bits=TRUE

# Java Additional Parameters

wrapper.java.additional.1=-Delasticsearch-service  
wrapper.java.additional.2=-Des.path.home=%ES\_HOME%  
wrapper.java.additional.3=-Xss256k  
wrapper.java.additional.4=-XX:+UseParNewGC  
wrapper.java.additional.5=-XX:+UseConcMarkSweepGC  
wrapper.java.additional.6=-XX:CMSInitiatingOccupancyFraction=75  
wrapper.java.additional.7=-XX:+UseCMSInitiatingOccupancyOnly  
wrapper.java.additional.8=-XX:+HeapDumpOnOutOfMemoryError  
wrapper.java.additional.9=-Djava.awt.headless=true

# Initial Java Heap Size (in MB)

wrapper.java.initmemory=%ES\_HEAP\_SIZE%

# Maximum Java Heap Size (in MB)

wrapper.java.maxmemory=%ES\_HEAP\_SIZE%

# Application parameters. Add parameters as needed starting from 1

wrapper.app.parameter.1=org.elasticsearch.bootstrap.ElasticSearchF

#\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

# Wrapper Logging Properties

#\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

# Enables Debug output from the Wrapper.

# wrapper.debug=TRUE

# Format of output for the console. (See docs for formats)

wrapper.console.format=PM

# Log Level for console output. (See docs for log levels)

wrapper.console.loglevel=INFO

# Log file to use for wrapper output logging.

wrapper.logfile=%ES\_HOME%/logs/service.log

# Format of output for the log file. (See docs for formats)

wrapper.logfile.format=LPTM

# Log Level for log file output. (See docs for log levels)

wrapper.logfile.loglevel=INFO

# Maximum size that the log file will be allowed to grow to before

# the log is rolled. Size is specified in bytes. The default value

# of 0, disables log rolling. May abbreviate with the 'k' (kb) or

# 'm' (mb) suffix. For example: 10m = 10 megabytes.

wrapper.logfile.maxsize=0

# Maximum number of rolled log files which will be allowed before old

# files are deleted. The default value of 0 implies no limit.

wrapper.logfile.maxfiles=0

# Log Level for sys/event log output. (See docs for log levels)

wrapper.syslog.loglevel=NONE

#\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

# Wrapper General Properties

#\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

# Allow for the use of non-contiguous numbered properties

wrapper.ignore\_sequence\_gaps=TRUE

# Title to use when running as a console

wrapper.console.title=ElasticSearch

#\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

# Wrapper Windows NT/2000/XP Service Properties

#\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

# WARNING - Do not modify any of these properties when an application

# using this configuration file has been installed as a service.

# Please uninstall the service before modifying this section. The

# service can then be reinstalled.

# Name of the service

wrapper.name=ElasticSearch

# Display name of the service

wrapper.displayname=ElasticSearch

# Description of the service

wrapper.description=Open Source, Distributed, RESTful Search Engine

# Service dependencies. Add dependencies as needed starting from 1

wrapper.ntservice.dependency.1=

# Mode in which the service is installed. AUTO\_START, DELAY\_START or

DEMAND\_START  
wrapper.ntservice.starttype=AUTO\_START

# Allow the service to interact with the desktop.

wrapper.ntservice.interactive=false

And the output of "free":

```
                total used free shared buffers   

```

cached  
Mem: 524288 28672 495616 0 0  
11804  
-/+ buffers/cache: 16868 507420  
Swap: 0 0 0

Any help would be greatly appreciated 🙂

Regards,  
ldx

--

---

<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:** [September 24, 2012, 3:28pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-service-could-not-reserve-enough-space-for-the-object-heap/9118/2 "2012-09-24T15:28:15Z")

</div>

Just wondering if you should not set memory settings to 256m instead of 256...

David

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

Le 24 sept. 2012 à 17:01, Lorenzo Dieryckx [lorenzo.dieryckx@gmail.com](mailto:lorenzo.dieryckx@gmail.com) a écrit :

> Hi,
> 
> I'm having trouble starting elastic on CentOS via the elasticsearch-service.  
> I get the error "Could not reserve enough space for the object heap"
> 
> I must say that I'm using a pretty low memory VPS, but I think that I should be able to run elastic anyway.
> 
> for reference: the contents of my elasticsearch.conf:  
> set.default.ES\_HOME=/opt/elasticsearch/elasticsearch-0.19.3  
> set.default.ES\_HEAP\_SIZE=256  
> set.default.ES\_MIN\_MEM=%ES\_HEAP\_SIZE%  
> set.default.ES\_MAX\_MEM=%ES\_HEAP\_SIZE%
> 
> #\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> # Wrapper Timeout Properties
> 
> #\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> # How long to wait for the JVM to start (in seconds)
> 
> wrapper.startup.timeout=300
> 
> # How long to wait for the JVM to stop (in seconds)
> 
> wrapper.shutdown.timeout=300
> 
> # When a ping will timeout to consider the JVM hung (in seconds)
> 
> wrapper.ping.timeout=300
> 
> #\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> # Wrapper Java Properties
> 
> #\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> # Java Application
> 
> wrapper.java.command=java
> 
> # Tell the Wrapper to log the full generated Java command line.
> 
> #wrapper.java.command.loglevel=INFO
> 
> wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
> 
> wrapper.working.dir=%ES\_HOME%
> 
> # Java Classpath (include wrapper.jar) Add class path elements as
> 
> # needed starting from 1
> 
> wrapper.java.classpath.1=%ES\_HOME%/bin/service/lib/wrapper.jar  
> wrapper.java.classpath.2=%ES\_HOME%/lib/elasticsearch\*.jar  
> wrapper.java.classpath.3=%ES\_HOME%/lib/_.jar  
> wrapper.java.classpath.4=%ES\_HOME%/lib/sigar/_.jar
> 
> # Java Library Path (location of Wrapper.DLL or libwrapper.so)
> 
> wrapper.java.library.path.1=%ES\_HOME%/bin/service/lib
> 
> # Java Bits. On applicable platforms, tells the JVM to run in 32 or 64-bit mode.
> 
> wrapper.java.additional.auto\_bits=TRUE
> 
> # Java Additional Parameters
> 
> wrapper.java.additional.1=-Delasticsearch-service  
> wrapper.java.additional.2=-Des.path.home=%ES\_HOME%  
> wrapper.java.additional.3=-Xss256k  
> wrapper.java.additional.4=-XX:+UseParNewGC  
> wrapper.java.additional.5=-XX:+UseConcMarkSweepGC  
> wrapper.java.additional.6=-XX:CMSInitiatingOccupancyFraction=75  
> wrapper.java.additional.7=-XX:+UseCMSInitiatingOccupancyOnly  
> wrapper.java.additional.8=-XX:+HeapDumpOnOutOfMemoryError  
> wrapper.java.additional.9=-Djava.awt.headless=true
> 
> # Initial Java Heap Size (in MB)
> 
> wrapper.java.initmemory=%ES\_HEAP\_SIZE%
> 
> # Maximum Java Heap Size (in MB)
> 
> wrapper.java.maxmemory=%ES\_HEAP\_SIZE%
> 
> # Application parameters. Add parameters as needed starting from 1
> 
> wrapper.app.parameter.1=org.elasticsearch.bootstrap.ElasticSearchF
> 
> #\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> # Wrapper Logging Properties
> 
> #\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> # Enables Debug output from the Wrapper.
> 
> # wrapper.debug=TRUE
> 
> # Format of output for the console. (See docs for formats)
> 
> wrapper.console.format=PM
> 
> # Log Level for console output. (See docs for log levels)
> 
> wrapper.console.loglevel=INFO
> 
> # Log file to use for wrapper output logging.
> 
> wrapper.logfile=%ES\_HOME%/logs/service.log
> 
> # Format of output for the log file. (See docs for formats)
> 
> wrapper.logfile.format=LPTM
> 
> # Log Level for log file output. (See docs for log levels)
> 
> wrapper.logfile.loglevel=INFO
> 
> # Maximum size that the log file will be allowed to grow to before
> 
> # the log is rolled. Size is specified in bytes. The default value
> 
> # of 0, disables log rolling. May abbreviate with the 'k' (kb) or
> 
> # 'm' (mb) suffix. For example: 10m = 10 megabytes.
> 
> wrapper.logfile.maxsize=0
> 
> # Maximum number of rolled log files which will be allowed before old
> 
> # files are deleted. The default value of 0 implies no limit.
> 
> wrapper.logfile.maxfiles=0
> 
> # Log Level for sys/event log output. (See docs for log levels)
> 
> wrapper.syslog.loglevel=NONE
> 
> #\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> # Wrapper General Properties
> 
> #\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> # Allow for the use of non-contiguous numbered properties
> 
> wrapper.ignore\_sequence\_gaps=TRUE
> 
> # Title to use when running as a console
> 
> wrapper.console.title=Elasticsearch
> 
> #\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> # Wrapper Windows NT/2000/XP Service Properties
> 
> #\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> # WARNING - Do not modify any of these properties when an application
> 
> # using this configuration file has been installed as a service.
> 
> # Please uninstall the service before modifying this section. The
> 
> # service can then be reinstalled.
> 
> # Name of the service
> 
> wrapper.name=Elasticsearch
> 
> # Display name of the service
> 
> wrapper.displayname=Elasticsearch
> 
> # Description of the service
> 
> wrapper.description=Open Source, Distributed, RESTful Search Engine
> 
> # Service dependencies. Add dependencies as needed starting from 1
> 
> wrapper.ntservice.dependency.1=
> 
> # Mode in which the service is installed. AUTO\_START, DELAY\_START or DEMAND\_START
> 
> wrapper.ntservice.starttype=AUTO\_START
> 
> # Allow the service to interact with the desktop.
> 
> wrapper.ntservice.interactive=false
> 
> And the output of "free":  
> total used free shared buffers cached  
> Mem: 524288 28672 495616 0 0 11804  
> -/+ buffers/cache: 16868 507420  
> Swap: 0 0 0
> 
> Any help would be greatly appreciated 🙂
> 
> ## Regards, ldx

--

---

<div class="post-metadata">

**Author:** ![Lorenzo\_Dieryckx](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lorenzo_dieryckx/32/2706_2.png) [@Lorenzo\_Dieryckx](https://discuss.elastic.co/u/Lorenzo_Dieryckx)\
**Post date:** [September 24, 2012, 7:26pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-service-could-not-reserve-enough-space-for-the-object-heap/9118/3 "2012-09-24T19:26:19Z")

</div>

Nope!

Just tried it, I get this:

wrapper | Encountered an invalid numerical value for configuration  
property wrapper.java.initmemory=256m. Resolving to 256.  
wrapper | Encountered an invalid numerical value for configuration  
property wrapper.java.maxmemory=256m. Resolving to 256.

Op maandag 24 september 2012 17:28:31 UTC+2 schreef David Pilato het  
volgende:

> Just wondering if you should not set memory settings to 256m instead of  
> 256...
> 
> David
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 24 sept. 2012 à 17:01, Lorenzo Dieryckx \<[lorenzo....@gmail.com](mailto:lorenzo....@gmail.com)\<javascript:\>\>  
> a écrit :
> 
> Hi,
> 
> I'm having trouble starting elastic on CentOS via the  
> elasticsearch-service.  
> I get the error "Could not reserve enough space for the object heap"
> 
> I must say that I'm using a pretty low memory VPS, but I think that I  
> should be able to run elastic anyway.
> 
> for reference: the contents of my elasticsearch.conf:
> 
> set.default.ES\_HOME=/opt/elasticsearch/elasticsearch-0.19.3  
> set.default.ES\_HEAP\_SIZE=256  
> set.default.ES\_MIN\_MEM=%ES\_HEAP\_SIZE%  
> set.default.ES\_MAX\_MEM=%ES\_HEAP\_SIZE%
> 
> #\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> # Wrapper Timeout Properties
> 
> #\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> # How long to wait for the JVM to start (in seconds)
> 
> wrapper.startup.timeout=300
> 
> # How long to wait for the JVM to stop (in seconds)
> 
> wrapper.shutdown.timeout=300
> 
> # When a ping will timeout to consider the JVM hung (in seconds)
> 
> wrapper.ping.timeout=300
> 
> #\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> # Wrapper Java Properties
> 
> #\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> # Java Application
> 
> wrapper.java.command=java
> 
> # Tell the Wrapper to log the full generated Java command line.
> 
> #wrapper.java.command.loglevel=INFO
> 
> wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
> 
> wrapper.working.dir=%ES\_HOME%
> 
> # Java Classpath (include wrapper.jar) Add class path elements as
> 
> # needed starting from 1
> 
> wrapper.java.classpath.1=%ES\_HOME%/bin/service/lib/wrapper.jar  
> wrapper.java.classpath.2=%ES\_HOME%/lib/elasticsearch\*.jar  
> wrapper.java.classpath.3=%ES\_HOME%/lib/_.jar  
> wrapper.java.classpath.4=%ES\_HOME%/lib/sigar/_.jar
> 
> # Java Library Path (location of Wrapper.DLL or libwrapper.so)
> 
> wrapper.java.library.path.1=%ES\_HOME%/bin/service/lib
> 
> # Java Bits. On applicable platforms, tells the JVM to run in 32 or
> 
> 64-bit mode.  
> wrapper.java.additional.auto\_bits=TRUE
> 
> # Java Additional Parameters
> 
> wrapper.java.additional.1=-Delasticsearch-service  
> wrapper.java.additional.2=-Des.path.home=%ES\_HOME%  
> wrapper.java.additional.3=-Xss256k  
> wrapper.java.additional.4=-XX:+UseParNewGC  
> wrapper.java.additional.5=-XX:+UseConcMarkSweepGC  
> wrapper.java.additional.6=-XX:CMSInitiatingOccupancyFraction=75  
> wrapper.java.additional.7=-XX:+UseCMSInitiatingOccupancyOnly  
> wrapper.java.additional.8=-XX:+HeapDumpOnOutOfMemoryError  
> wrapper.java.additional.9=-Djava.awt.headless=true
> 
> # Initial Java Heap Size (in MB)
> 
> wrapper.java.initmemory=%ES\_HEAP\_SIZE%
> 
> # Maximum Java Heap Size (in MB)
> 
> wrapper.java.maxmemory=%ES\_HEAP\_SIZE%
> 
> # Application parameters. Add parameters as needed starting from 1
> 
> wrapper.app.parameter.1=org.elasticsearch.bootstrap.ElasticSearchF
> 
> #\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> # Wrapper Logging Properties
> 
> #\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> # Enables Debug output from the Wrapper.
> 
> # wrapper.debug=TRUE
> 
> # Format of output for the console. (See docs for formats)
> 
> wrapper.console.format=PM
> 
> # Log Level for console output. (See docs for log levels)
> 
> wrapper.console.loglevel=INFO
> 
> # Log file to use for wrapper output logging.
> 
> wrapper.logfile=%ES\_HOME%/logs/service.log
> 
> # Format of output for the log file. (See docs for formats)
> 
> wrapper.logfile.format=LPTM
> 
> # Log Level for log file output. (See docs for log levels)
> 
> wrapper.logfile.loglevel=INFO
> 
> # Maximum size that the log file will be allowed to grow to before
> 
> # the log is rolled. Size is specified in bytes. The default value
> 
> # of 0, disables log rolling. May abbreviate with the 'k' (kb) or
> 
> # 'm' (mb) suffix. For example: 10m = 10 megabytes.
> 
> wrapper.logfile.maxsize=0
> 
> # Maximum number of rolled log files which will be allowed before old
> 
> # files are deleted. The default value of 0 implies no limit.
> 
> wrapper.logfile.maxfiles=0
> 
> # Log Level for sys/event log output. (See docs for log levels)
> 
> wrapper.syslog.loglevel=NONE
> 
> #\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> # Wrapper General Properties
> 
> #\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> # Allow for the use of non-contiguous numbered properties
> 
> wrapper.ignore\_sequence\_gaps=TRUE
> 
> # Title to use when running as a console
> 
> wrapper.console.title=Elasticsearch
> 
> #\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> # Wrapper Windows NT/2000/XP Service Properties
> 
> #\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> # WARNING - Do not modify any of these properties when an application
> 
> # using this configuration file has been installed as a service.
> 
> # Please uninstall the service before modifying this section. The
> 
> # service can then be reinstalled.
> 
> # Name of the service
> 
> wrapper.name=Elasticsearch
> 
> # Display name of the service
> 
> wrapper.displayname=Elasticsearch
> 
> # Description of the service
> 
> wrapper.description=Open Source, Distributed, RESTful Search Engine
> 
> # Service dependencies. Add dependencies as needed starting from 1
> 
> wrapper.ntservice.dependency.1=
> 
> # Mode in which the service is installed. AUTO\_START, DELAY\_START or
> 
> DEMAND\_START  
> wrapper.ntservice.starttype=AUTO\_START
> 
> # Allow the service to interact with the desktop.
> 
> wrapper.ntservice.interactive=false
> 
> And the output of "free":
> 
> ```
> total used free shared buffers 
> cached
> 
> ```
> 
> Mem: 524288 28672 495616 0 0  
> 11804  
> -/+ buffers/cache: 16868 507420  
> Swap: 0 0 0
> 
> Any help would be greatly appreciated 🙂
> 
> Regards,  
> ldx
> 
> --

--

---

<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:** [September 24, 2012, 8:51pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-service-could-not-reserve-enough-space-for-the-object-heap/9118/4 "2012-09-24T20:51:08Z")

</div>

Did you try to modify elasticsearch.yml file?

# ElasticSearch performs poorly when JVM starts swapping: you should ensure

that

# it _never_ swaps.

# 

# Set this property to true to lock the memory:

# 

# bootstrap.mlockall: true

# Make sure that the ES\_MIN\_MEM and ES\_MAX\_MEM environment variables are set

# to the same value, and that the machine has enough memory to allocate

# for ElasticSearch, leaving enough memory for the operating system itself.

# 

# You should also make sure that the ElasticSearch process is allowed to

lock

# the memory, eg. by using `ulimit -l unlimited`.

De : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)]  
De la part de Lorenzo Dieryckx  
Envoyé : lundi 24 septembre 2012 21:26  
À : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
Objet : Re: Can't start elasticsearch service: "Could not reserve enough  
space for the object heap"

Nope!

Just tried it, I get this:

wrapper | Encountered an invalid numerical value for configuration property  
wrapper.java.initmemory=256m. Resolving to 256.

wrapper | Encountered an invalid numerical value for configuration property  
wrapper.java.maxmemory=256m. Resolving to 256.

Op maandag 24 september 2012 17:28:31 UTC+2 schreef David Pilato het  
volgende:

Just wondering if you should not set memory settings to 256m instead of  
256...

David

--

David 😉

Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 24 sept. 2012 à 17:01, Lorenzo Dieryckx \<[lorenzo....@gmail.com](mailto:lorenzo....@gmail.com)  
\<javascript:\> \> a écrit :

Hi,

I'm having trouble starting elastic on CentOS via the elasticsearch-service.

I get the error "Could not reserve enough space for the object heap"

I must say that I'm using a pretty low memory VPS, but I think that I should  
be able to run elastic anyway.

for reference: the contents of my elasticsearch.conf:

set.default.ES\_HOME=/opt/elasticsearch/elasticsearch-0.19.3

set.default.ES\_HEAP\_SIZE=256

set.default.ES\_MIN\_MEM=%ES\_HEAP\_SIZE%

set.default.ES\_MAX\_MEM=%ES\_HEAP\_SIZE%

#\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

# Wrapper Timeout Properties

#\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

# How long to wait for the JVM to start (in seconds)

wrapper.startup.timeout=300

# How long to wait for the JVM to stop (in seconds)

wrapper.shutdown.timeout=300

# When a ping will timeout to consider the JVM hung (in seconds)

wrapper.ping.timeout=300

#\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

# Wrapper Java Properties

#\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

# Java Application

wrapper.java.command=java

# Tell the Wrapper to log the full generated Java command line.

#wrapper.java.command.loglevel=INFO

wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp

wrapper.working.dir=%ES\_HOME%

# Java Classpath (include wrapper.jar) Add class path elements as

# needed starting from 1

wrapper.java.classpath.1=%ES\_HOME%/bin/service/lib/wrapper.jar

wrapper.java.classpath.2=%ES\_HOME%/lib/elasticsearch\*.jar

wrapper.java.classpath.3=%ES\_HOME%/lib/\*.jar

wrapper.java.classpath.4=%ES\_HOME%/lib/sigar/\*.jar

# Java Library Path (location of Wrapper.DLL or libwrapper.so)

wrapper.java.library.path.1=%ES\_HOME%/bin/service/lib

# Java Bits. On applicable platforms, tells the JVM to run in 32 or 64-bit

mode.

wrapper.java.additional.auto\_bits=TRUE

# Java Additional Parameters

wrapper.java.additional.1=-Delasticsearch-service

wrapper.java.additional.2=-Des.path.home=%ES\_HOME%

wrapper.java.additional.3=-Xss256k

wrapper.java.additional.4=-XX:+UseParNewGC

wrapper.java.additional.5=-XX:+UseConcMarkSweepGC

wrapper.java.additional.6=-XX:CMSInitiatingOccupancyFraction=75

wrapper.java.additional.7=-XX:+UseCMSInitiatingOccupancyOnly

wrapper.java.additional.8=-XX:+HeapDumpOnOutOfMemoryError

wrapper.java.additional.9=-Djava.awt.headless=true

# Initial Java Heap Size (in MB)

wrapper.java.initmemory=%ES\_HEAP\_SIZE%

# Maximum Java Heap Size (in MB)

wrapper.java.maxmemory=%ES\_HEAP\_SIZE%

# Application parameters. Add parameters as needed starting from 1

wrapper.app.parameter.1=org.elasticsearch.bootstrap.ElasticSearchF

#\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

# Wrapper Logging Properties

#\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

# Enables Debug output from the Wrapper.

# wrapper.debug=TRUE

# Format of output for the console. (See docs for formats)

wrapper.console.format=PM

# Log Level for console output. (See docs for log levels)

wrapper.console.loglevel=INFO

# Log file to use for wrapper output logging.

wrapper.logfile=%ES\_HOME%/logs/service.log

# Format of output for the log file. (See docs for formats)

wrapper.logfile.format=LPTM

# Log Level for log file output. (See docs for log levels)

wrapper.logfile.loglevel=INFO

# Maximum size that the log file will be allowed to grow to before

# the log is rolled. Size is specified in bytes. The default value

# of 0, disables log rolling. May abbreviate with the 'k' (kb) or

# 'm' (mb) suffix. For example: 10m = 10 megabytes.

wrapper.logfile.maxsize=0

# Maximum number of rolled log files which will be allowed before old

# files are deleted. The default value of 0 implies no limit.

wrapper.logfile.maxfiles=0

# Log Level for sys/event log output. (See docs for log levels)

wrapper.syslog.loglevel=NONE

#\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

# Wrapper General Properties

#\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

# Allow for the use of non-contiguous numbered properties

wrapper.ignore\_sequence\_gaps=TRUE

# Title to use when running as a console

wrapper.console.title=ElasticSearch

#\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

# Wrapper Windows NT/2000/XP Service Properties

#\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

# WARNING - Do not modify any of these properties when an application

# using this configuration file has been installed as a service.

# Please uninstall the service before modifying this section. The

# service can then be reinstalled.

# Name of the service

wrapper.name=ElasticSearch

# Display name of the service

wrapper.displayname=ElasticSearch

# Description of the service

wrapper.description=Open Source, Distributed, RESTful Search Engine

# Service dependencies. Add dependencies as needed starting from 1

wrapper.ntservice.dependency.1=

# Mode in which the service is installed. AUTO\_START, DELAY\_START or

DEMAND\_START

wrapper.ntservice.starttype=AUTO\_START

# Allow the service to interact with the desktop.

wrapper.ntservice.interactive=false

And the output of "free":

```
                total used free shared buffers

```

cached

Mem: 524288 28672 495616 0 0  
11804

-/+ buffers/cache: 16868 507420

Swap: 0 0 0

Any help would be greatly appreciated 🙂

Regards,

ldx

--

--

--

---

<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:11am UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-service-could-not-reserve-enough-space-for-the-object-heap/9118/5 "2017-07-06T03:11:39Z")

</div>


