• Could not reserve enough space for object heap

  • Problems with installing OpenKM? No problemo, the solution is closer than you think.
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.
 #23123  by HarryW
 
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.
 #23125  by HarryW
 
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.
 #23140  by jllort
 
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
 #42539  by jllort
 
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
 #43257  by douglas.cunha
 
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?
 #43268  by jllort
 
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

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.