Could not reserve enough space for object heap

Problems with installing OpenKM? No problemo, the solution is closer than you think.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
HarryW
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: Mon May 20, 2013 1:38 pm

Could not reserve enough space for object heap

Post by HarryW » Mon May 20, 2013 1:59 pm

Hi,

I downloaded the Windows bundle of OpenKM and installed it on a NB with Windows XP SP3, 3GB RAM, 1,7GB free.
This is what I get when I try to start it:

Code: Select all

F:\Programme\openkm-6.2.3-community\tomcat\bin>catalina run
Using CATALINA_BASE:   "F:\Programme\openkm-6.2.3-community\tomcat"
Using CATALINA_HOME:   "F:\Programme\openkm-6.2.3-community\tomcat"
Using CATALINA_TMPDIR: "F:\Programme\openkm-6.2.3-community\tomcat\temp"
Using JRE_HOME:        "c:\Programme\Java\jdk1.6.0_25\"
Using CLASSPATH:       "F:\Programme\openkm-6.2.3-community\tomcat\bin\bootstrap.jar;F:\Programme\openkm-6.2.3-community\tomcat\bin\tomcat-juli.jar"
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
According to some information I found in this and other forums I tried to add this to catalina.bat:
set "JAVA_OPTS=-Xms1024m -Xmx1024m -XX:NewSize=512m -XX:MaxNewSize=512m -XX:PermSize=512m -XX:MaxPermSize=512m"
I also tried to change the values in setenv.bat according to a thread in this forum but the error is always the same.

Any suggestions what else might be the problem?

As a side note: I also installed Logicaldoc which comes with its own Tomcat7 server and that one works.

HarryW
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: Mon May 20, 2013 1:38 pm

Re: Could not reserve enough space for object heap (Solved)

Post by HarryW » Mon May 20, 2013 4:10 pm

After some more tests I decided to uninstall and re-install the aplication.
I then changed in setenv.bat "set JAVA_OPTS=-Xms256m -Xmx2048m..." to "set JAVA_OPTS=-Xms256m -Xmx1024m..." and now it works...

Funny thing is, I did this before and it did not work... But anyway. Problem solved.

jllort
Moderator
Moderator
Posts: 9447
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Could not reserve enough space for object heap

Post by jllort » Tue May 21, 2013 9:15 am

for heap problems should modify -XX:PermSize=256m -XX:MaxPermSize=512m

Take in mind you should control your server has enought memory for Os, other apps, and which will be used by tomcat

jaunty
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: Sat Nov 05, 2016 8:47 pm
Contact:

Re: Could not reserve enough space for object heap

Post by jaunty » Sat Nov 05, 2016 8:48 pm

I would like to have more information too, because I have similar situation as earlier commentator. I greet you

jllort
Moderator
Moderator
Posts: 9447
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Could not reserve enough space for object heap

Post by jllort » Mon Nov 07, 2016 8:13 am

At setenv.xh or setenv.bat must reserve memory for the heap ( as I explained in the previous post ). If you are using jdk 1.7 or below increase MaxPermSize ( for upper version the heap is automatically redimesioned by the VM )

Code: Select all

-XX:PermSize=256m -XX:MaxPermSize=512m

douglas.cunha
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: Mon Feb 20, 2017 6:45 pm

Re: Could not reserve enough space for object heap

Post by douglas.cunha » Mon Feb 20, 2017 7:06 pm

I had the same problem after uploading some big files. Now I get OutOfMemoryException error whenever the service try to start.

Already switched to 64-bit Java and increased the default options.

I changed my setenv.bat to:

Code: Select all

set JAVA_OPTS =-Xms512m-Xmx2048m - XX: PermSize = 128M - XX: MaxPermSize = 512m-Djava.awt.headless=true-Dfile.encoding=utf-8
What else can I do to get it to start again?

jllort
Moderator
Moderator
Posts: 9447
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Could not reserve enough space for object heap

Post by jllort » Tue Feb 21, 2017 7:39 pm

Be care with spaces, seems you have missed some one and others should be removed like between 512m-Djava

This is yours:

Code: Select all

set JAVA_OPTS =-Xms512m-Xmx2048m - XX: PermSize = 128M - XX: MaxPermSize = 512m-Djava.awt.headless=true-Dfile.encoding=utf-8
I suggest

Code: Select all

set JAVA_OPTS =-Xms512m -Xmx2048m -XX:PermSize=128M -XX:MaxPermSize=512m -Djava.awt.headless=true -Dfile.encoding=utf-8
or ( with increased heap size to 1024m )

Code: Select all

set JAVA_OPTS =-Xms512m -Xmx2048m -XX:PermSize=128M -XX:MaxPermSize=1024m -Djava.awt.headless=true -Dfile.encoding=utf-8

dellmerca
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: Thu Jul 13, 2017 10:46 am

Re: Could not reserve enough space for object heap

Post by dellmerca » Thu Jul 13, 2017 10:47 am

Starting a JVM like below will start it with 256MB of memory, and will allow the process to use up to 2048MB of memory:

Code: Select all

java -Xmx2048m -Xms256m
More about...memory management

Dell

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest