Fórumok

Heap Memory issue

Just Geeked, módosítva 13 év-val korábban

Heap Memory issue

New Member Bejegyzések: 2 Csatlakozás dátuma: 2011.04.13. Legújabb bejegyzések
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, módosítva 13 év-val korábban

RE: Heap Memory issue

Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzések
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, módosítva 13 év-val korábban

RE: Heap Memory issue

Liferay Legend Bejegyzések: 1519 Csatlakozás dátuma: 2006.08.07. Legújabb bejegyzések
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, módosítva 13 év-val korábban

RE: Heap Memory issue

Liferay Legend Bejegyzések: 6403 Csatlakozás dátuma: 2008.09.23. Legújabb bejegyzések
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, módosítva 9 év-val korábban

RE: Heap Memory issue

New Member Bejegyzések: 2 Csatlakozás dátuma: 2014.12.12. Legújabb bejegyzések
Hey Mika, thank very much, it helps me a lot.. \o/ emoticon
thumbnail
Ramalingaiah Dudidmetle, módosítva 9 év-val korábban

RE: Heap Memory issue

Expert Bejegyzések: 486 Csatlakozás dátuma: 2014.08.16. Legújabb bejegyzések
Hey Mika, thank very much, it helps me a lot..
Ram
thumbnail
Olaf Kock, módosítva 9 év-val korábban

RE: Heap Memory issue

Liferay Legend Bejegyzések: 6403 Csatlakozás dátuma: 2008.09.23. Legújabb bejegyzések
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