Page 1 of 1

Trying to increase memory allocation

PostPosted:Mon Sep 07, 2015 9:28 am
by eurbinati
at the moment setenv.bat contains the following statements:
Code: Select all
set JAVA_OPTS=-Xms128m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m -Djava.awt.headless=true -Dfile.encoding=utf-8
set JAVA_OPTS=%JAVA_OPTS% -XX:+UseConcMarkSweepGC -Dlog4j.configuration=file:///%CATALINA_HOME%/conf/log4j.properties
set PATH=%PATH%;%CATALINA_HOME%\lib\sigar
set JAVA_HOME=C:\openkm\java
launching configtest I get the following:
Code: Select all
C:\openkm\tomcat\bin>catalina.bat configtest
Using CATALINA_BASE:   "C:\openkm\tomcat"
Using CATALINA_HOME:   "C:\openkm\tomcat"
Using CATALINA_TMPDIR: "C:\openkm\tomcat\temp"
Using JRE_HOME:        "C:\openkm\java"
Using CLASSPATH:       "C:\openkm\tomcat\bin\bootstrap.jar;C:\openkm\tomcat\bin\
tomcat-juli.jar"
2015-09-07 11:23:36,074 [    main] INFO  org.apache.catalina.core.AprLifecycleListener - The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\openkm\java\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\openkm\tomcat\lib\sigar;C:\openkm\tomcat\lib\sigar;.
2015-09-07 11:23:36,293 [    main] INFO  org.apache.coyote.http11.Http11Protocol - Initializing ProtocolHandler ["http-bio-0.0.0.0-8080"]
2015-09-07 11:23:36,324 [    main] INFO  org.apache.coyote.ajp.AjpProtocol - Initializing ProtocolHandler ["ajp-bio-8009"]
2015-09-07 11:23:36,324 [    main] INFO  org.apache.catalina.startup.Catalina -Initialization processed in 461 ms
In order to increase memory allocation I have changed the first row as below
Code: Select all
set JAVA_OPTS=-Xms256m -Xmx2048m -XX:PermSize=256m -XX:MaxPermSize=512m
then launching configtest I get the error below
Code: Select all
C:\openkm\tomcat\bin>catalina.bat configtest
Using CATALINA_BASE:   "C:\openkm\tomcat"
Using CATALINA_HOME:   "C:\openkm\tomcat"
Using CATALINA_TMPDIR: "C:\openkm\tomcat\temp"
Using JRE_HOME:        ""C:\openkm\java""
Using CLASSPATH:       "C:\openkm\tomcat\bin\bootstrap.jar;C:\openkm\tomcat\bin\tomcat-juli.jar"
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.
OKM 6.2.5 Build 8109
OS = windows server 2008 R2, Virtual Machine, 64bit
RAM = 6GB

TaskManager is reporting
Physical Memory (MB)
Total 6143
Cached 2183
Available 4923
Free 2794

How can I increase OKM memory allocation?

Thanks

Re: Trying to increase memory allocation

PostPosted:Tue Sep 08, 2015 11:05 am
by jllort
You're on 64 or 32 bits OS ?
Try to stop other applications before starting openkm.

Re: Trying to increase memory allocation

PostPosted:Tue Sep 08, 2015 11:20 am
by eurbinati
64 bit
Windows server 2008 R2 standard
virtual machine.

Looking into Windows Task Manager, I do not see other applications running

Re: Trying to increase memory allocation

PostPosted:Thu Sep 10, 2015 6:30 am
by jllort
Install java jdk 1.7 ( 64 bits ) and set JAVA_HOME at setenv.bat ( default installer comes with embedded 1.7 32 bits and I think it could be the problem ).

Re: Trying to increase memory allocation

PostPosted:Thu Sep 10, 2015 9:22 am
by eurbinati
Thank you very much, it is working using java 64 bits :D

Re: Trying to increase memory allocation

PostPosted:Fri Sep 11, 2015 9:03 pm
by jllort
I take note about it for next installer, because I suspect you have not been the only user with the same problem.