AnsweredAssumed Answered

Again a PermGen problem

Question asked by claudio.corsi on Oct 13, 2008
Latest reply on Oct 14, 2008 by claudio.corsi
Hi all,
I'm trying the Alfresco Lab 3.0 boundle edition (the one with Tomcat included).

I've configured everything correctly following the Wiki, in fact I get no WARNING or ERROR into the log when I start Alfresco.

Anyway, when I try to access for the first time the application via Web Browser (http://localhost:8080/alfresco),  I get an OutOfMemory error due to the PermGen component (both in the logs and in the browser).

The alfresco.log (as the catalina.log) reports the following error (repeated many times):

17:32:04,997 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/alfresco].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
java.lang.OutOfMemoryError: PermGen space
   at org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompiler.java:207)
   at org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompiler.java:179)
   at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:119)
   at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:178)
   at org.eclipse.jdt.internal.compiler.lookup.Scope.getPackage(Scope.java:2166)
   at org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference.getTypeBinding(QualifiedTypeReference.java:62)
   at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:141)
   at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveSuperType(TypeReference.java:104)
   at org.eclipse.jdt.internal.compiler.lookup.ClassScope.findSupertype(ClassScope.java:1107)
   at org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectSuperclass(ClassScope.java:767)
   at org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectTypeHierarchy(ClassScope.java:947)
   at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.connectTypeHierarchy(CompilationUnitScope.java:266)
   at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.completeTypeBindings(LookupEnvironment.java:195)
   at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:301)
   at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:315)
   at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:425)
   at org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
   at org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
   at org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
   at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299)
   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)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
   at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:594)
   at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:505)
   at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:965)
   at org.apache.jsp.jsp.dashboards.layouts.single_002dcolumn_jsp._jspService(single_002dcolumn_jsp.java:163)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)

Note that I get this error both launching the Alfresco app via /etc/init.d/alfresco script (copied from the wiki) and using the alfresco.sh script released within the original .tar.gz.

Crawling the forum I've seen that many people has this problem and someone has solved it using some custom JAVA_OPTS parameters. I'm trying to find the right configuration form me, but no way!

So far I'm using:


export JAVA_OPTS='-Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m -server -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled'

I'm echoing JAVA_OPTS in tomcat/bin/startup.sh to be sure that such value is still there when I run this script. It seems to be ok, as in console I read:

root@pgbserver:/opt/alfresco# ./alfresco.sh start
Using JAVA_OPTS: -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m -server -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -XX:CompileCommand=exclude,org/apache/lucene/index/IndexReader$1,doBody -XX:CompileCommand=exclude,org/alfresco/repo/search/impl/lucene/index/IndexInfo$Merger,mergeIndexes -XX:CompileCommand=exclude,org/alfresco/repo/search/impl/lucene/index/IndexInfo$Merger,mergeDeletions
Using CATALINA_BASE:   /opt/alfresco/tomcat
Using CATALINA_HOME:   /opt/alfresco/tomcat
Using CATALINA_TMPDIR: /opt/alfresco/tomcat/temp
Using JRE_HOME:       /usr/lib/jvm/java-6-sun

To now nothing seems to change even if I use a different config, the PermGen OutOfMem error still come out!

What do you think?

Outcomes