掲示板

Heap Memory issue

13年前 に Just Geeked によって更新されました。

Heap Memory issue

New Member 投稿: 2 参加年月日: 11/04/13 最新の投稿
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
13年前 に Hitoshi Ozawa によって更新されました。

RE: Heap Memory issue

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
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
13年前 に Mika Koivisto によって更新されました。

RE: Heap Memory issue

Liferay Legend 投稿: 1519 参加年月日: 06/08/07 最新の投稿
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
13年前 に Olaf Kock によって更新されました。

RE: Heap Memory issue

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
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
9年前 に Ronilson Reis によって更新されました。

RE: Heap Memory issue

New Member 投稿: 2 参加年月日: 14/12/12 最新の投稿
Hey Mika, thank very much, it helps me a lot.. \o/ emoticon
thumbnail
9年前 に Ramalingaiah Dudidmetle によって更新されました。

RE: Heap Memory issue

Expert 投稿: 486 参加年月日: 14/08/16 最新の投稿
Hey Mika, thank very much, it helps me a lot..
Ram
thumbnail
9年前 に Olaf Kock によって更新されました。

RE: Heap Memory issue

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
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