cancel
Showing results for 
Search instead for 
Did you mean: 

java.lang.OutOfMemoryError: PermGen space in Alfresco 2.1

simon
Champ in-the-making
Champ in-the-making
Alfresco,

We are trying out Alfresco 2.1 Comunity here and I'm impressed with the imporovements since 1.4, nice. After working on a clean installation for a while we got the following error:

09:12:17,398 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/alfresco].[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.OutOfMemoryError: PermGen space
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:242)
        at sun.nio.cs.AbstractCharsetProvider.lookup(AbstractCharsetProvider.java:125)
        at sun.nio.cs.AbstractCharsetProvider.access$000(AbstractCharsetProvider.java:28)
        at sun.nio.cs.AbstractCharsetProvider$1.next(AbstractCharsetProvider.java:165)
        at sun.nio.cs.AbstractCharsetProvider$1.next(AbstractCharsetProvider.java:168)
        at java.nio.charset.Charset.put(Charset.java:508)
        at java.nio.charset.Charset.access$300(Charset.java:240)
        at java.nio.charset.Charset$4.run(Charset.java:548)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.nio.charset.Charset.availableCharsets(Charset.java:541)
        at org.alfresco.web.ui.repo.component.UICharsetSelector.createList(UICharsetSelector.java:78)
        at org.alfresco.web.ui.repo.component.UICharsetSelector.encodeBegin(UICharsetSelector.java:60)
        at org.alfresco.web.ui.common.Utils.encodeRecursive(Utils.java:409)
        at org.alfresco.web.ui.repo.renderer.property.PropertySheetItemRenderer.encodeChildren(PropertySheetItemRenderer.java:109)
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:527)
        at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:414)
        at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:229)
        at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:101)
        at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
        at org.alfresco.web.ui.repo.component.property.UIPropertySheet.encodeEnd(UIPropertySheet.java:200)
        at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:498)
        at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:366)
        at org.apache.jsp.jsp.content.edit_002dcontent_002dproperties_jsp._jspx_meth_r_005fpropertySheetGrid_005f0(edit_002dcontent_002dproperties_jsp.java:166)
        at org.apache.jsp.jsp.content.edit_002dcontent_002dproperties_jsp._jspService(edit_002dcontent_002dproperties_jsp.java:74)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)

After this it's impossible to login… Our Alfresco is running on a standard Linux PC with 1GB RAM, this should do it, shouldn't it?
7 REPLIES 7

steve
Champ in-the-making
Champ in-the-making
Please search the forums for 'permgen space'

Steve

raweck
Champ on-the-rise
Champ on-the-rise
Try to increase amount of memory, for example for Windows and Tomcat you can set environment variable:

CATALINA_OPTS=-server -XX:MaxPermSize=256m
I do not know if this variable works in Linux environment.
If value 256 does not work, change it.

simon
Champ in-the-making
Champ in-the-making
Thanks, I was confused with the Java heap space, we changed that one before. I'll try this!

kevinr
Star Contributor
Star Contributor
Try to increase amount of memory, for example for Windows and Tomcat you can set environment variable:

CATALINA_OPTS=-server -XX:MaxPermSize=256m
I do not know if this variable works in Linux environment.
If value 256 does not work, change it.

That is indeed the fix. We have only seen this before on JBoss (which loads a lot more classes than plain tomcat) - are you using JBoss? If not, do you have a lot of other webapps (i.e. a lot more JAR files) in memory? I'm interested because if this is a default installation on plain tomcat then we may need to increase the PermGenSpace value by default for 2.1.

Thanks,

Kevin

simon
Champ in-the-making
Champ in-the-making
Kevin,

We are evaluation 2.1 RC on Tomcat, standalone. We did import the blog module AMP package and the WCM one almost from the start. I don't really remember if the problem also occurred before or after this but I don't think it would hurt adding a bit more memory from the start.

– Simon

nyronian
Champ in-the-making
Champ in-the-making
Kevin,

I, just today started getting the following on tomcat 5.5, Windows XP.

I also have a Linux version running…I will watch it on there.

Exception in thread "DefaultScheduler_QuartzSchedulerThread" java.lang.OutOfMemo
ryError: PermGen space
Exception in thread "http-80-Processor24" java.lang.OutOfMemoryError: PermGen space
Exception in thread "http-80-Processor25" java.lang.OutOfMemoryError: PermGen space
Exception in thread "http-80-Processor22" java.lang.OutOfMemoryError: PermGen space

I will increase the MAXPERMSIZE and see if it fixes it.

kevinr
Star Contributor
Star Contributor
It will fix it. It can happen to any Java app that loads enough classes…

Kevin
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.