cancel
Showing results for 
Search instead for 
Did you mean: 

OutOfMemoryError: PermGen space

mkieboom
Champ in-the-making
Champ in-the-making
Hi there,

Within our company we have Alfresco running within VMWare for a few months now however still we have problems with Permgen space error from Java.
The error occurs every 2 or 3 days while the virtual machine is definetely powerfull enough to run Alfresco.

I can not find any website or blog with the right solution to the problem.
Can anyone help me with this problem? The wiki from Alfresco also did not give me the right solution.
http://wiki.alfresco.com/wiki/ASR_Performance_Optimization

Kind regards,


Marcel Kieboom


export JAVA_OPTS='-Xms2G -Xmx4G -Xss1024k -XX:MaxPermSize=256m -XX:NewSize=1G -server'
export JAVA_OPTS='-Xms512m -Xmx768m -Xss768k -XX:MaxPermSize=256m -XX:NewSize=256m -server'
export JAVA_OPTS='-Xms512m -Xmx1024m -Xss1024k -XX:MaxPermSize=256m -XX:NewSize=256m -server'
export JAVA_OPTS='-Xms1G -Xmx2G -Xss1024k -XX:MaxPermSize=256m -XX:NewSize=512m -server'
export JAVA_OPTS="${JAVA_OPTS} -Dalfresco.home=${ALF_HOME} -Dcom.sun.management.jmxremote"
export JAVA_OPTS='-Xms768m -Xmx1536m -Xss1m -XX:MaxPermSize=128m -Xcomp -Xbatch -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:NewSize=384m -XX:CMSInitiatingOccupancyFraction=80 -server'
export JAVA_OPTS='-Xms768m -Xmx1536m -Xss1024k -XX:MaxPermSize=256m -Xcomp -Xbatch -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:NewSize=512m -XX:CMSInitiatingOccupancyFraction=80 -server'
export JAVA_OPTS='-Xms768m -Xmx1536m -Xss1024k -XX:MaxPermSize=382m -Xcomp -Xbatch -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:NewSize=512m -XX:CMSInitiatingOccupancyFraction=80 -server'

The code above shows the settings I made / changed where the last line is the current setting.

Alfresco Community v4.0.0 (3979) schema 5025

Here some pieces of the log file when the error occured:


=====================================================================================================================================================

Exception in thread "http-8080-12" java.lang.OutOfMemoryError: PermGen space
Exception in thread "JobAcquisitionThread" java.lang.OutOfMemoryError: PermGen space
Exception in thread "http-8080-62" java.lang.OutOfMemoryError: PermGen space
Exception in thread "http-8080-31" java.lang.OutOfMemoryError: PermGen space
Exception in thread "RMI RenewClean-[192.168.1.213:50502,org.alfresco.util.remote.server.socket.HostConfigurableSocketFactory@0]" java.lang.OutOfMemoryError: PermGen space
Exception in thread "RMI RenewClean-[192.168.1.213:50501,org.alfresco.util.remote.server.socket.HostConfigurableSocketFactory@0]" java.lang.OutOfMemoryError: PermGen space
Exception in thread "RMI RenewClean-[192.168.1.213:50504,org.alfresco.util.remote.server.socket.HostConfigurableSocketFactory@0]" java.lang.OutOfMemoryError: PermGen space
Exception in thread "RMI RenewClean-[192.168.1.213:50506,org.alfresco.util.remote.server.socket.HostConfigurableSocketFactory@0]" java.lang.OutOfMemoryError: PermGen space
Exception in thread "RMI RenewClean-[192.168.1.213:50508]" java.lang.OutOfMemoryError: PermGen space
2012-05-29 13:27:19,199  ERROR [extensions.webscripts.AbstractRuntime] [http-8080-12] Exception from executeScript - redirecting to status template error: 04290002 Wrapped Exception (with status template): 042923501 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/doclist.get.js': 042923500 PermGen space
2012-05-29 13:27:19,200  ERROR [extensions.webscripts.AbstractRuntime] [http-8080-31] Exception from executeScript - redirecting to status template error: 04290003 Wrapped Exception (with status template): 042923506 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/site/site.get.js': 042923504 Exception from transactional callback: org.alfresco.repo.transaction.RetryingTransactionAdvice$1@c87c354
2012-05-29 13:28:55,095  ERROR [job.executor.JobExecutorThread] [AlfrescoJbpmJobExecutor:192.168.1.213:1] exception in job executor thread. waiting 90000 milliseconds
2012-05-29 13:29:00,056  ERROR [transaction.SpringAwareUserTransaction.trace] [Finalizer] Detected first UserTransaction which is being garbage collected without a commit() or rollback()
2012-05-29 13:29:00,056  ERROR [transaction.SpringAwareUserTransaction.trace] [Finalizer] Logging of transaction call stack is now enabled and will affect performance
Exception in thread "RMI RenewClean-[192.168.1.213:50505,org.alfresco.util.remote.server.socket.HostConfigurableSocketFactory@0]" java.lang.OutOfMemoryError: PermGen space
Exception in thread "RMI RenewClean-[192.168.1.213:55574]" java.lang.OutOfMemoryError: PermGen space
Exception in thread "AlfrescoJbpmJobExecutor:192.168.1.213:1" java.lang.OutOfMemoryError: PermGen space
2012-05-29 13:29:22,231  ERROR [quartz.simpl.SimpleThreadPool] [DefaultScheduler_Worker-3] Error while executing the Runnable:
java.lang.OutOfMemoryError: PermGen space
2012-05-29 13:27:53,380  INFO  [webscripts.connector.RemoteClient] [http-8080-62] Error status 499 Read timed out
2012-05-29 13:29:25,649  ERROR [extensions.webscripts.AbstractRuntime] [http-8080-18] Exception from executeScript - redirecting to status template error: (class: org/springframework/extensions/webscripts/WebScriptException, method: getStatusModel signature: ()Ljava/util/Map;) Illegal constant pool index
2012-05-29 13:29:30,546  INFO  [webscripts.connector.RemoteClient] [http-8080-27] Error status 499 Read timed out
2012-05-29 13:29:33,411  ERROR [surf.render.RenderService] [http-8080-18] The following error occurred attemping to render a sub-component
java.lang.OutOfMemoryError: PermGen space
2012-05-29 13:29:35,794  ERROR [transaction.SpringAwareUserTransaction.trace] [Finalizer] UserTransaction being garbage collected without a commit() or rollback(). NOTE: Prior to transaction call stack logging.
2012-05-29 13:29:35,791  ERROR [extensions.webscripts.AbstractRuntime] [http-8080-27] Exception from executeScript - redirecting to status template error: (class: org/springframework/extensions/webscripts/WebScriptException, method: getStatusModel signature: ()Ljava/util/Map;) Illegal constant pool index
2012-05-29 13:29:40,776  ERROR [surf.render.RenderService] [http-8080-27] The following error occurred attemping to render a sub-component
java.lang.OutOfMemoryError: PermGen space
2012-05-29 13:29:58,409  ERROR [quartz.simpl.SimpleThreadPool] [DefaultScheduler_Worker-7] Error while executing the Runnable:
java.lang.OutOfMemoryError: PermGen space
2012-05-29 13:30:03,703  ERROR [extensions.webscripts.AbstractRuntime] [http-8080-34] Exception from executeScript - redirecting to status template error: PermGen space
java.lang.OutOfMemoryError: PermGen space
2012-05-29 13:30:13,451  ERROR [transaction.SpringAwareUserTransaction.trace] [Finalizer] UserTransaction being garbage collected without a commit() or rollback(). NOTE: Prior to transaction call stack logging.
2012-05-29 13:30:13,451  ERROR [transaction.SpringAwareUserTransaction.trace] [Finalizer] UserTransaction being garbage collected without a commit() or rollback(). NOTE: Prior to transaction call stack logging.


=====================================================================================================================================================

2012-05-23 09:00:00,091  INFO  [security.sync.ChainingUserRegistrySynchronizer] [DefaultScheduler_Worker-6] Synchronize User Creation and Association: Completed batch of 3 entries
2012-05-23 09:00:00,125  INFO  [security.sync.ChainingUserRegistrySynchronizer] [DefaultScheduler_Worker-6] Finished synchronizing users and groups with user registry 'Synchronize'
2012-05-23 09:00:00,125  INFO  [security.sync.ChainingUserRegistrySynchronizer] [DefaultScheduler_Worker-6] 3 user(s) and 0 group(s) processed
Exception in thread "AlfrescoJbpmJobExecutor:192.168.1.213:1" Exception in thread "DefaultScheduler_QuartzSchedulerThread" Exception in thread "http-8080-59" 2012-05-23 09:21:49,674  ERROR [extensions.webscripts.AbstractRuntime] [http-8080-59] Exception from executeScript - redirecting to status template error: PermGen space
2012-05-23 09:22:16,704  ERROR [transaction.SpringAwareUserTransaction.trace] [Finalizer] Detected first UserTransaction which is being garbage collected without a commit() or rollback()
2012-05-23 09:22:16,705  ERROR [transaction.SpringAwareUserTransaction.trace] [Finalizer] Logging of transaction call stack is now enabled and will affect performance

=====================================================================================================================================================
2012-05-22 13:42:18,526  ERROR [post.lookup.PostLookup] [DefaultScheduler_Worker-3] Exception during update of posts
java.lang.OutOfMemoryError: PermGen space
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818)
        at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
        at org.alfresco.repo.activities.post.lookup.PostLookup.execute(PostLookup.java:165)
        at org.alfresco.repo.activities.post.lookup.PostLookupJob.execute(PostLookupJob.java:50)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)
Exception in thread "JobAcquisitionThread" java.lang.OutOfMemoryError: PermGen space
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2444)
        at java.lang.Class.getMethod0(Class.java:2687)
        at java.lang.Class.getMethod(Class.java:1620)
        at org.apache.commons.logging.LogFactory.directGetContextClassLoader(LogFactory.java:896)
        at org.apache.commons.logging.LogFactory$1.run(LogFactory.java:862)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.commons.logging.LogFactory.getContextClassLoaderInternal(LogFactory.java:859)
        at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:423)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685)
        at org.springframework.transaction.support.TransactionTemplate.<init>(TransactionTemplate.java:66)
        at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:38)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
        at org.activiti.engine.impl.jobexecutor.JobAcquisitionThread.run(JobAcquisitionThread.java:63)
2012-05-22 13:43:05,467  ERROR [post.lookup.PostLookup] [DefaultScheduler_Worker-7] Exception during update of posts
java.lang.OutOfMemoryError: PermGen space
=====================================================================================================================================================
23 REPLIES 23

bisana
Champ on-the-rise
Champ on-the-rise
In your previous post, I had seen this
JVM Vendor: Sun Microsystems Inc.
so I assumed you have Sun Java
can you please post the result of
whereis java 
java -version

mkieboom
Champ in-the-making
Champ in-the-making
I understand that sorry for the inconvenience

root@alfresco:~# whereis java
java: /usr/bin/java /usr/share/java /usr/share/man/man1/java.1.gz
root@alfresco:~# java -version
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.13) (6b20-1.9.13-0ubuntu1~10.04.1)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

I added here a screenshot of the JConsole VM Summary, does the VM Arguments mean that the settings are not being passed to the VM?
http://www.brogum.nl/2012-05-31_141747.png
[img]http://www.brogum.nl/2012-05-31_141747.png[/img]

bisana
Champ on-the-rise
Champ on-the-rise
Please do not take this advice seriously,
After taking backup of catalina.sh
can you  try out
JAVA_OPTS="$JAVA_OPTS -Xms128m -Xmx1024m -XX:MaxPermSize=128m

Take backup, so that you can roll back if not working

mkieboom
Champ in-the-making
Champ in-the-making
My alfresco.sh looks currently like this:

ALF_HOME=/opt/alfresco
cd "$ALF_HOME"
APPSERVER="${ALF_HOME}/tomcat"
export CATALINA_HOME="$APPSERVER"
export LOGFILE=/var/log/alfresco/alfresco.log
export JAVA_OPTS='-Xms768m -Xmx1536m -Xss1024k -XX:MaxPermSize=382m -Xcomp -Xbatch -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:NewSize=512m -XX:CMSInitiatingOccupancyFraction=80 -server'
export JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9004 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rimi.server.hostname=192.168.1.213"
if [ "$1" = "start" ]; then
sudo -H -u alfresco /bin/sh /opt/alfresco/tomcat/bin/startup.sh
elif [ "$1" = "stop" ]; then
sudo -H -u alfresco /bin/sh /opt/alfresco/tomcat/bin/shutdown.sh
fi
Where the following line is added as latest for the jmxremote. Really weird however it looks like if Alfresco is currently much faster after I added this rule.
export JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9004 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rimi.server.hostname=192.168.1.213"

mward
Champ in-the-making
Champ in-the-making
It looks like your environment variables are not being picked up.

One way around this is to move those exports/settings to .profile of the alfresco user and then change

sudo -H -u alfresco /bin/sh /opt/alfresco/tomcat/bin/startup.sh

to

sudo -H -u alfresco /bin/sh -l /opt/alfresco/tomcat/bin/startup.sh

that should source the environment from .profile (notice the -l after /bin/sh)

However you choose to modify the environment, check with jconsole that the changes are picked up and everything should work.

BTW -XX:MaxPermSize does seem to be correct for OpenJDK.

mkieboom
Champ in-the-making
Champ in-the-making
Hi mward,

It looks like your settings in the .profile are doing the job.
Now I just need to find out which settings are most optimal for operating alfresco.

Thanks a lot!

Any suggestions?

Kind regards,


Marcel

chethan_cp
Champ in-the-making
Champ in-the-making
Hi All,

I am running Alfresco but i am not able to get anything because of some error.. please help me out to resolve



8 Aug, 2012 10:15:43 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:\Windows\System32;C:\Windows;C:\devtools\tools\java\jdk1.6.0_06\bin;C:\cygwin\bin;C:\Program Files\ImageMagick-6.7.8-Q16;C:\Program Files\SWFTools;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\CVSNT\
8 Aug, 2012 10:15:43 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
8 Aug, 2012 10:15:43 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 648 ms
8 Aug, 2012 10:15:43 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
8 Aug, 2012 10:15:43 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
8 Aug, 2012 10:15:43 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor alfresco.xml
8 Aug, 2012 10:15:45 AM org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
8 Aug, 2012 10:15:49 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
2012-08-08 10:16:03,929  INFO  [management.subsystems.ChildApplicationContextFactory] [main] Starting 'sysAdmin' subsystem, ID: [sysAdmin, default]
2012-08-08 10:16:04,003  INFO  [management.subsystems.ChildApplicationContextFactory] [main] Startup of 'sysAdmin' subsystem, ID: [sysAdmin, default] complete
8 Aug, 2012 10:16:15 AM org.activiti.engine.impl.ProcessEngineImpl <init>
INFO: ProcessEngine default created
2012-08-08 10:16:16,849  WARN  [alfresco.util.AbstractTriggerBean] [main] Job ehCacheTracerJob is not active/enabled
2012-08-08 10:16:23,586  INFO  [extensions.webscripts.TemplateProcessorRegistry] [main] Registered template processor Repository Template Processor for extension ftl
2012-08-08 10:16:23,591  INFO  [extensions.webscripts.ScriptProcessorRegistry] [main] Registered script processor Repository Script Processor for extension js
2012-08-08 10:16:35,115  ERROR [factory.support.DefaultListableBeanFactory] [main] Destroy method on bean with name 'publishingEventHelper' threw an exception
java.lang.OutOfMemoryError: PermGen space
   at java.lang.Class.getDeclaredMethods0(Native Method)
   at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
   at java.lang.Class.getDeclaredMethods(Unknown Source)
   at org.apache.cxf.common.injection.ResourceInjector.getAnnotatedMethods(ResourceInjector.java:347)
   at org.apache.cxf.common.injection.ResourceInjector.getPreDestroyMethods(ResourceInjector.java:340)
   at org.apache.cxf.common.injection.ResourceInjector.invokePreDestroy(ResourceInjector.java:317)
   at org.apache.cxf.common.injection.ResourceInjector.destroy(ResourceInjector.java:96)
   at org.apache.cxf.bus.spring.Jsr250BeanPostProcessor.postProcessBeforeDestruction(Jsr250BeanPostProcessor.java:99)
   at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:166)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:487)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:463)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:431)
   at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1048)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:433)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
   at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
2012-08-08 10:16:37,853  ERROR [factory.support.DefaultListableBeanFactory] [main] Destroy method on bean with name 'RatingService' threw an exception
java.lang.OutOfMemoryError: PermGen space
   at java.lang.Class.getDeclaredConstructors0(Native Method)
   at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
   at java.lang.Class.getConstructor0(Unknown Source)
   at java.lang.Class.newInstance0(Unknown Source)
   at java.lang.Class.newInstance(Unknown Source)
   at sun.reflect.MethodAccessorGenerator$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at sun.reflect.MethodAccessorGenerator.generate(Unknown Source)
   at sun.reflect.MethodAccessorGenerator.generateConstructor(Unknown Source)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
   at java.lang.reflect.Constructor.newInstance(Unknown Source)
   at java.lang.reflect.Proxy.newProxyInstance(Unknown Source)
   at sun.reflect.annotation.AnnotationParser.annotationForMap(Unknown Source)
   at sun.reflect.annotation.AnnotationParser.parseAnnotation(Unknown Source)
   at sun.reflect.annotation.AnnotationParser.parseAnnotations2(Unknown Source)
   at sun.reflect.annotation.AnnotationParser.parseAnnotations(Unknown Source)
   at java.lang.reflect.Method.declaredAnnotations(Unknown Source)
   at java.lang.reflect.Method.getAnnotation(Unknown Source)
   at org.apache.cxf.common.injection.ResourceInjector.addAnnotatedMethods(ResourceInjector.java:358)
   at org.apache.cxf.common.injection.ResourceInjector.getAnnotatedMethods(ResourceInjector.java:346)
   at org.apache.cxf.common.injection.ResourceInjector.getPreDestroyMethods(ResourceInjector.java:340)
   at org.apache.cxf.common.injection.ResourceInjector.invokePreDestroy(ResourceInjector.java:317)
   at org.apache.cxf.common.injection.ResourceInjector.destroy(ResourceInjector.java:96)
   at org.apache.cxf.bus.spring.Jsr250BeanPostProcessor.postProcessBeforeDestruction(Jsr250BeanPostProcessor.java:99)
   at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:166)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:487)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:463)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:431)
   at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1048)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:433)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
2012-08-08 10:16:39,199  ERROR [factory.support.DefaultListableBeanFactory] [main] Destroy method on bean with name 'sandboxService' threw an exception
java.lang.OutOfMemoryError: PermGen space
   at java.lang.Class.getDeclaredMethods0(Native Method)
   at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
   at java.lang.Class.getDeclaredMethods(Unknown Source)
   at org.apache.cxf.common.injection.ResourceInjector.getAnnotatedMethods(ResourceInjector.java:347)
   at org.apache.cxf.common.injection.ResourceInjector.getPreDestroyMethods(ResourceInjector.java:340)
   at org.apache.cxf.common.injection.ResourceInjector.invokePreDestroy(ResourceInjector.java:317)
   at org.apache.cxf.common.injection.ResourceInjector.destroy(ResourceInjector.java:96)
   at org.apache.cxf.bus.spring.Jsr250BeanPostProcessor.postProcessBeforeDestruction(Jsr250BeanPostProcessor.java:99)
   at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:166)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:487)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:463)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:431)
   at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1048)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:433)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
   at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
2012-08-08 10:16:41,892  ERROR [factory.support.DefaultListableBeanFactory] [main] Destroy method on bean with name 'activitiWorkflowEngine' threw an exception
java.lang.OutOfMemoryError: PermGen space
2012-08-08 10:16:44,575  ERROR [factory.support.DefaultListableBeanFactory] [main] Destroy method on bean with name 'SiteService' threw an exception
java.lang.OutOfMemoryError: PermGen space
2012-08-08 10:16:47,163  ERROR [factory.support.DefaultListableBeanFactory] [main] Destroy method on bean with name 'ac-content-properties' threw an exception
java.lang.OutOfMemoryError: PermGen space
2012-08-08 10:16:50,221  ERROR [factory.support.DefaultListableBeanFactory] [main] Destroy method on bean with name 'multilingualContentService' threw an exception
java.lang.OutOfMemoryError: PermGen space
2012-08-08 10:16:52,758  ERROR [factory.support.DefaultListableBeanFactory] [main] Destroy method on bean with name 'jobLockService' threw an exception
java.lang.OutOfMemoryError: PermGen space
2012-08-08 10:16:55,263  ERROR [factory.support.DefaultListableBeanFactory] [main] Destroy method on bean with name 'nodeDAO.org.hibernate.dialect.Dialect' threw an exception
java.lang.OutOfMemoryError: PermGen space
2012-08-08 10:16:57,801  ERROR [factory.support.DefaultListableBeanFactory] [main] Destroy method on bean with name 'alfrescoMBeanServer' threw an exception
java.lang.OutOfMemoryError: PermGen space
2012-08-08 10:16:59,144  INFO  [management.subsystems.ChildApplicationContextFactory] [main] Stopping 'sysAdmin' subsystem, ID: [sysAdmin, default]
2012-08-08 10:16:59,144  INFO  [management.subsystems.ChildApplicationContextFactory] [main] Stopped 'sysAdmin' subsystem, ID: [sysAdmin, default]
8 Aug, 2012 10:17:01 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.alfresco.web.app.ContextLoaderListener
java.lang.OutOfMemoryError: PermGen space
8 Aug, 2012 10:17:09 AM org.apache.catalina.startup.HostConfig deployDescriptor
SEVERE: Error deploying configuration descriptor alfresco.xml
java.lang.OutOfMemoryError: PermGen space
8 Aug, 2012 10:17:09 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor alfresco_old.xml
8 Aug, 2012 10:17:09 AM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\devtools\tools\Tomcat 6.0\webapps\alfresco_old does not exist or is not a readable directory
   at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142)
   at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4249)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4418)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
   at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
   at org.apache.catalina.core.StandardService.start(StandardService.java:519)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
8 Aug, 2012 10:17:09 AM org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
8 Aug, 2012 10:17:09 AM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
8 Aug, 2012 10:17:09 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco_old] startup failed due to previous errors
8 Aug, 2012 10:17:09 AM org.apache.catalina.core.StandardContext stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/alfresco_old] has not been started
8 Aug, 2012 10:17:11 AM org.apache.catalina.mbeans.ServerLifecycleListener processContainerAddChild
SEVERE: processContainerAddChild: Throwable
java.lang.OutOfMemoryError: PermGen space
8 Aug, 2012 10:17:11 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
8 Aug, 2012 10:17:14 AM org.apache.catalina.startup.HostConfig deployDescriptor
SEVERE: Error deploying configuration descriptor manager.xml
java.lang.OutOfMemoryError: PermGen space
8 Aug, 2012 10:17:14 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war
8 Aug, 2012 10:17:22 AM org.apache.catalina.startup.HostConfig deployWAR
SEVERE: Error deploying web application archive alfresco.war
java.lang.OutOfMemoryError: PermGen space
8 Aug, 2012 10:17:22 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive share.war
8 Aug, 2012 10:17:24 AM org.apache.catalina.startup.HostConfig deployWAR
SEVERE: Error deploying web application archive share.war
java.lang.OutOfMemoryError: PermGen space
java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.OutOfMemoryError: PermGen space

toze
Champ in-the-making
Champ in-the-making
I have the same issue! Any help?

t_sato
Champ in-the-making
Champ in-the-making
If your Alfresco was built from source, you will need to configure Java correctly to avoid java.lang.OutOfMemoryError: PermGen space.

I have added the configuration to wiki some days ago. Please note that Tomcat6 needs additional requirement as described.

toze
Champ in-the-making
Champ in-the-making
Im using windows, so i have to modify catalina.bat right?
But where i can add the parameters, or in what files?

added this line set JAVA_OPTS=-server -Xms512M -Xmx768M -XX:MaxPermSize=256m to catalina.bat