Foren

Heap Memory issue

Just Geeked, geändert vor 13 Jahren.

Heap Memory issue

New Member Beiträge: 2 Beitrittsdatum: 13.04.11 Neueste Beiträge
Hi,

I have trouble lauching liferay 6.
I'm working on windows 7 | RAM: 3GB | OS 64 bit | Processor: AMD Athlon(tm) II X2 215 Processor 2.70GHZ

Description:
I got the following message from catalina.bat:
...\liferay-portal-6.0.6\tomcat-6.0.29\bin>catalina.bat run
Using CATALINA_BASE: "...\liferay-portal-6.0.6\tomcat-6.0.29"
Using CATALINA_HOME: "...\liferay-portal-6.0.6\tomcat-6.0.29"
Using CATALINA_TMPDIR: "...\liferay-portal-6.0.6\tomcat-6.0.29\temp"
Using JRE_HOME: "...\liferay-portal-6.0.6\tomcat-6.0.29/jre1.6.0_20/w
in"
Using CLASSPATH: "...\liferay-portal-6.0.6\tomcat-6.0.29\bin\bootstrap
.jar"
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

I've seen on other post that I should incvrease heap memory but I don't know where (which file??? why what???)
I've tried to had " -Xms1024m -Xmx1024m -XX:MaxPermSize=128m" into the catalina.bat but I still got the same error message.

*Extract from catamina.bat:
:noJuliConfig
set JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx1024m -XX:MaxPermSize=128m %LOGGING_CONFIG%

if not "%LOGGING_MANAGER%" == "" goto noJuliManager
set LOGGING_MANAGER=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
:noJuliManager
set JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx1024m -XX:MaxPermSize=128m %LOGGING_MANAGER%

Could someone help me please?
Cheers
thumbnail
Hitoshi Ozawa, geändert vor 13 Jahren.

RE: Heap Memory issue

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
I've seen on other post that I should incvrease heap memory but I don't know where (which file??? why what???)


\tomcat-{version}\bin\setenv.bat or setenv.sh

In the "JAVA_OPT" variable.
thumbnail
Mika Koivisto, geändert vor 13 Jahren.

RE: Heap Memory issue

Liferay Legend Beiträge: 1519 Beitrittsdatum: 07.08.06 Neueste Beiträge
JVM needs continuous memory for heap. If it can't reserve the amount you've specified it will fail. Try setting following in your setenv.bat:
set JAVA_OPTS=%JAVA_OPTS% -Xmx512m -XX:MaxPermSize=256m -Dfile.encoding=UTF8 


If it starts with those then try increasing the memory. 128m MaxPermSize is also too small. 256m is usually quite safe number.
thumbnail
Olaf Kock, geändert vor 13 Jahren.

RE: Heap Memory issue

Liferay Legend Beiträge: 6403 Beitrittsdatum: 23.09.08 Neueste Beiträge
Adding to this: You might want to try starting tomcat directly after booting the computer (when memory is not yet fragmented) and try to use a 64bit java on your 64bit OS (I'm not sure if memory fragmentation is still relevant on a full 64bit system.

Otherwise: More RAM will help
thumbnail
Ronilson Reis, geändert vor 9 Jahren.

RE: Heap Memory issue

New Member Beiträge: 2 Beitrittsdatum: 12.12.14 Neueste Beiträge
Hey Mika, thank very much, it helps me a lot.. \o/ emoticon
thumbnail
Ramalingaiah Dudidmetle, geändert vor 9 Jahren.

RE: Heap Memory issue

Expert Beiträge: 486 Beitrittsdatum: 16.08.14 Neueste Beiträge
Hey Mika, thank very much, it helps me a lot..
Ram
thumbnail
Olaf Kock, geändert vor 9 Jahren.

RE: Heap Memory issue

Liferay Legend Beiträge: 6403 Beitrittsdatum: 23.09.08 Neueste Beiträge
As this is warming up a very old topic and might bring it to more people's attention: Please note that you shouldn't use JAVA_OPTS, rather use CATALINA_OPTS. Liferay's default bundles have changed their configuration due to LPS-26464