Forums

Home » Liferay Portal » English » Liferay Legacy »

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Chad Shryock
java.lang.OutOfMemoryError: PermGen space
November 22, 2006 7:14 PM
Answer

Chad Shryock

Rank: Expert

Posts: 285

Join Date: August 26, 2006

Recent Posts

Any one see this before:

2006-11-22 22:10:57,132 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/].[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.OutOfMemoryError: PermGen space
2006-11-22 22:10:57,133 ERROR [com.liferay.taglib.util.IncludeTag] java.lang.OutOfMemoryError: PermGen space

Is this because I need to give the JVM more memory? Any ideas?

This is displayed on the Admin Portlet:
Uptime: 00:58:27
Free Memory: 118,310,032 Bytes
Total Memory: 259,534,848 Bytes
Maximum Memory: 530,907,136 Bytes

Thanks in advance,
Chad.
Michael Young
RE: java.lang.OutOfMemoryError: PermGen space
November 22, 2006 9:05 PM
Answer

Michael Young

LIFERAY STAFF

Rank: Liferay Master

Posts: 833

Join Date: August 4, 2004

Recent Posts

add -XX:MaxPermSize=128m to your jvm options
Chad Shryock
RE: java.lang.OutOfMemoryError: PermGen space
November 23, 2006 4:28 AM
Answer

Chad Shryock

Rank: Expert

Posts: 285

Join Date: August 26, 2006

Recent Posts

Thanks! This seems to have fixed the problem.

Question: where in the documentation would I have found this? That way I don't have to keep asking questions.

Thanks,
Chad.
Michael Young
RE: java.lang.OutOfMemoryError: PermGen space
November 23, 2006 6:31 AM
Answer

Michael Young

LIFERAY STAFF

Rank: Liferay Master

Posts: 833

Join Date: August 4, 2004

Recent Posts

This particular item is not in there. But our wiki does have a lot of useful information. Actually if you could update our wiki for this particular item we'd appreciate it!

http://wiki.liferay.com/index.php/Liferay_FAQ

Search for "What do I do if I am getting Out of Memory Errors"
Andres Serra Fernández
RE: java.lang.OutOfMemoryError: PermGen space
September 24, 2008 3:14 AM
Answer

Andres Serra Fernández

Rank: New Member

Posts: 2

Join Date: September 19, 2008

Recent Posts

In that Wiki says what we have to modify de file named catalina.bat, but I can´t find these terms in the file, I found it in setenv.bat, but the problem persists.

Any other idea? I'm using lomboz and liferay 5+tomcat 6.

Thanks!
Mika Koivisto
RE: java.lang.OutOfMemoryError: PermGen space
October 1, 2008 1:39 PM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1002

Join Date: August 7, 2006

Recent Posts

Are you lauching Liferay from Lomboz? If you are you need to change the launch parameters for the server in your IDE not in tomcat's startup scripts.
Michael Saechang
RE: java.lang.OutOfMemoryError: PermGen space
October 1, 2008 5:32 PM
Answer

Michael Saechang

LIFERAY STAFF

Rank: Liferay Master

Posts: 573

Join Date: November 19, 2007

Recent Posts

you would modify the JAVA_OPTS in the catalina.bat

example.
set JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx512m -XX:MaxPermSize=256m -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"
:noJuli


-mike
Karimila Babu Maganti
RE: java.lang.OutOfMemoryError: PermGen space
July 19, 2009 10:31 AM
Answer

Karimila Babu Maganti

Rank: New Member

Posts: 14

Join Date: May 19, 2009

Recent Posts

Hi Mike,

I have same kind of issue.

When try to run starup.bat, there is no issue but when i am using windows service option to run my liferay server.

The when i try to tun service, i am getting this error.. Please help me.

Any body help would be appreciated.

Thanks,
Babu.
Zsolt Balogh
RE: java.lang.OutOfMemoryError: PermGen space
July 19, 2009 11:37 PM
Answer

Zsolt Balogh

LIFERAY STAFF

Rank: Expert

Posts: 404

Join Date: March 23, 2009

Recent Posts

Hi,

you can find documentation about starting tomcat as a Windows service here:

http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html

--JvmOptions is what you are looking for.
Adrian Rodriguez Monedero
RE: java.lang.OutOfMemoryError: PermGen space
November 29, 2010 7:36 AM
Answer

Adrian Rodriguez Monedero

Rank: New Member

Posts: 11

Join Date: October 17, 2010

Recent Posts

Michael Young:
This particular item is not in there. But our wiki does have a lot of useful information. Actually if you could update our wiki for this particular item we'd appreciate it!

http://wiki.liferay.com/index.php/Liferay_FAQ

Search for "What do I do if I am getting Out of Memory Errors"


That page does not exist anymore. Or does it?
Назойливый Вопрошатель
RE: java.lang.OutOfMemoryError: PermGen space
November 21, 2011 4:32 AM
Answer

Назойливый Вопрошатель

Rank: Junior Member

Posts: 45

Join Date: October 11, 2011

Recent Posts

Update for Liferay 6.1: 128m in MaxPermSize option is not enough. Setting it to 256m will solve the problem.
Tal M
RE: java.lang.OutOfMemoryError: PermGen space
November 22, 2011 1:40 PM
Answer

Tal M

Rank: New Member

Posts: 5

Join Date: May 4, 2011

Recent Posts

I set it to 512 or 1024 but the problem persist.
I also monitored the liferay tomcat process using jconsole, and seems there is a memory leaks since the perm gen space raises continuously.

Is that a known CRITICAL in 6.1?
we must have a solution for this problem.

Thanks
Tal
Wesley Johnson
RE: java.lang.OutOfMemoryError: PermGen space
January 23, 2012 8:53 AM
Answer

Wesley Johnson

Rank: New Member

Posts: 1

Join Date: January 23, 2012

Recent Posts

I believe I'm finding the same symptoms as you, Tal. For Liferay 6.0, I'm consistently getting a "java.lang.OutOfMemoryError: PermGen space" on Tomcat startup.

After trying many JAVA_OPTS memory property combinations (XX:MaxPermSize, etc.) as high as 2048m, and even after removing all portlets except for ROOT, I still encounter this problem.

Has anybody found any workarounds or troubleshooting paths when XX:MaxPermSize is not working as a solution for the OutOfMemoryError?

Here is the exact stack trace:

20.01.12 18:33:42 ERROR ContextLoader: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.scripting.ScriptingImpl' defined in class path resource [META-INF/scripting-spring.xml]: Cannot create inner bean 'com.liferay.portal.scripting.ruby.RubyExecutor#d0f59e' of type [com.liferay.portal.scripting.ruby.RubyExecutor] while setting bean property 'scriptingExecutors' with key [TypedStringValue: value [ruby], target type [null]]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.scripting.ruby.RubyExecutor#d0f59e' defined in class path resource [META-INF/scripting-spring.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.liferay.portal.scripting.ruby.RubyExecutor]: Constructor threw exception; nested exception is java.lang.OutOfMemoryError: PermGen space
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:378)
Nilesh Gundecha
RE: java.lang.OutOfMemoryError: PermGen space
February 1, 2012 11:37 PM
Answer

Nilesh Gundecha

Rank: Regular Member

Posts: 171

Join Date: November 30, 2009

Recent Posts

Hi,

I am too facing some memory issues with Liferay 6.1. I have started new thread for same click here

Lets discus it here.


Tal M:
I set it to 512 or 1024 but the problem persist.
I also monitored the liferay tomcat process using jconsole, and seems there is a memory leaks since the perm gen space raises continuously.

Is that a known CRITICAL in 6.1?
we must have a solution for this problem.

Thanks
Tal