cancel
Showing results for 
Search instead for 
Did you mean: 

could not reserve enough space for object heap during server start

Former Member
0 Kudos

Hi there,

I've installed Hybris 5.2.0.2 on Windows Server 2008 R2 (64-bit) with 32GB RAM. When i start hybris sever, it shows the error below:

C:\hybris\bin\platform>hybrisserver Used config: C:\hybris\bin\platform\tomcat/conf/wrapper.conf --> Wrapper Started as Console Java Service Wrapper Standard Edition 64-bit 3.5.24 Copyright (C) 1999-2014 Tanuki Software, Ltd. All Rights Reserved. http://wrapper.tanukisoftware.com Licensed to hybris software - www.hybris.com for hybris Platform

Launching a JVM... Error occurred during initialization of VM Could not reserve enough space for object heap Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. JVM exited while loading the application. Reloading Wrapper configuration... Launching a JVM... Error occurred during initialization of VM Could not reserve enough space for object heap

My JDK version is jdk-7u67-windows-i586.

I changed to wrapper.conf in the following folder to 1G, and then recompiled but got the same error. C:\hybris\bin\platform\tomcat\conf

wrapper.java.additional.1=-Xmx2G changed to 1G, didnt work.

Do you guys know how to fix this issue?

Thanks, David

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello David,

We need a contiguous memory region for heap and since your JVM is 32bits (which has an upper limit on size of memory, you heap size may not be enough because the DLLs and driver or some libraries have to be loaded into the memory before hybris.

I will suggest you switch to 64bits JVM on your 64 bit windows.

Former Member
0 Kudos

Thanks heaps Roger! The hybris server is now running on the 64bits JVM.

Former Member
0 Kudos

Hello All, I have installed hybris 5.6 to my windows 7 machine and received the mentioned error while starting the application using hybrisserver.bat, so i have installed java 64 bit jvm but still receiving the same error, any further guidance? Best regards and thank you,

Former Member
0 Kudos

Thank you , it has worked after updating local.properties file & repeat the build command.

Former Member
0 Kudos

What changes did you made to your local.properties file?

Answers (4)

Answers (4)

Former Member
0 Kudos

if you have enough ram(more than 8 gb) in system then check below two things.

  1. check java_home using command script.

  2. check jdk path in wrapper.conf in tomcat.

if it is different in os version (i.e. x86 and X64) then change the path accordingly in wrapper.conf

I have done same thing and issue got resolve.

former_member648242
Discoverer
0 Kudos

This resolved my issue. Thanks.

Former Member
0 Kudos

I would recommend to add the settings in the local.properties

tomcat.generaloptions=-Xmx2048M -XX:MaxPermSize=300M -ea -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dorg.tanukisoftware.wrapper.WrapperManager.mbean=true -Djava.endorsed.dirs="%CATALINA_HOME%/lib/endorsed" -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA_HOME% -Dfile.encoding=UTF-8 -Dlog4j.configuration=log4j_init_tomcat.properties -Djava.util.logging.config.file=jdk_logging.properties -Djava.io.tmpdir="${HYBRIS_TEMP_DIR}"

Former Member
0 Kudos

I am facing the same problem. I checked my java bit version and is 64 bit. My hybris server was starting up before. I installed a CMD enhancer on my windows machine. That is the only change. Here is the error I see on the console. Any idea?

C:\hybris-commerce-suite-5-2\hybris\bin\platform>hybrisserver Used config: C:\hybris-commerce-suite-5-2\hybris\bin\platform\tomcat/conf/wrapper.conf --> Wrapper Started as Console Java Service Wrapper Standard Edition 64-bit 3.5.24 Copyright (C) 1999-2014 Tanuki Software, Ltd. All Rights Reserved. http://wrapper.tanukisoftware.com Licensed to hybris software - www.hybris.com for hybris Platform

Launching a JVM... Error occurred during initialization of VM Could not reserve enough space for object heap Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. JVM exited while loading the application. Reloading Wrapper configuration... Launching a JVM... Error occurred during initialization of VM Could not reserve enough space for object heap Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. JVM exited while loading the application. Reloading Wrapper configuration... Launching a JVM... Error occurred during initialization of VM Could not reserve enough space for object heap Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. JVM exited while loading the application. Reloading Wrapper configuration... Launching a JVM...

Former Member
0 Kudos

As Roger said you have to use 64bits JVM. If you encounter java.lang.OutOfMemoryError durinig initializing/startup of the platform please try to update the following: 1. Change Xmx falue in setantenv file from 200 to 1200

2. Update (or add if you do not have it yet) the following entries in your local.properties file (Xmx values in these entries can differ from the ones given): standalone.javaoptions=-Xmx4096M -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError -ea

standalone.javaoptions - This one is used for configuring standalone mode tenant stnd perform initialization with all its memory/cpu consuming functions.

If you encounter java.lang.OutOfMemoryError durinig compiling the platform please try to change the following entry in setantenv file:

from ANT_OPTS=-Xmx200m

to ANT_OPTS="-Xmx1200m -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError"

Its adjustment of xmx for ant process to 1.2GB (Basically it does not need more for compilation and processing build process) - since it spawns a separate JavaProcess with own environment.

Former Member
0 Kudos

Thanks Szymon. The issue has been fixed by installing 64bits JVM. Appreciated your help.

Former Member
0 Kudos

This worked for me. Thanks a lot for putting an appropriate answer. Appreciate it. Thanks.

Former Member
0 Kudos

I'm afraid, this doesn't work on Hybris 6.4 :(