cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco crash while uploading documents

fluca1978
Champ in-the-making
Champ in-the-making
Hi all,
I'm running 3.2 ce on a dedicated machine and while uploading documents thru web services the machine gets "crazy" (I mean the java process serving Tomcat consumes the 100% of the cpu and the web client got a socket i/o error). The stack trace found in the tomcat logs was:


10:47:57,401 User:smanico INFO  [management.subsystems.ChildApplicationContextFactory] Stopping 'fileServers' subsystem, ID: [default]
10:47:58,269 User:smanico INFO  [management.subsystems.ChildApplicationContextFactory] Stopped 'fileServers' subsystem, ID: [default]
10:47:58,270 User:smanico INFO  [management.subsystems.ChildApplicationContextFactory] Stopping 'imap' subsystem, ID: [default]
10:47:58,270 User:smanico INFO  [management.subsystems.ChildApplicationContextFactory] Stopped 'imap' subsystem, ID: [default]
10:47:58,271 User:smanico INFO  [management.subsystems.ChildApplicationContextFactory] Stopping 'Synchronization' subsystem, ID: [default]
10:47:58,271 User:smanico INFO  [management.subsystems.ChildApplicationContextFactory] Stopped 'Synchronization' subsystem, ID: [default]
10:47:58,299 User:smanico INFO  [management.subsystems.ChildApplicationContextFactory] Stopping 'thirdparty' subsystem, ID: [default]
10:47:58,303 User:smanico INFO  [management.subsystems.ChildApplicationContextFactory] Stopped 'thirdparty' subsystem, ID: [default]
10:47:58,309 User:smanico INFO  [management.subsystems.ChildApplicationContextFactory] Stopping 'Authentication' subsystem, ID: [managed, passthru1]
10:47:58,310 User:smanico INFO  [management.subsystems.ChildApplicationContextFactory] Stopped 'Authentication' subsystem, ID: [managed, passthru1]
10:47:58,310 User:smanico INFO  [management.subsystems.ChildApplicationContextFactory] Stopping 'Authentication' subsystem, ID: [managed, alfrescoNtlm1]
10:47:58,310 User:smanico INFO  [management.subsystems.ChildApplicationContextFactory] Stopped 'Authentication' subsystem, ID: [managed, alfrescoNtlm1]
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.
4-apr-2011 10.48.30 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.
4-apr-2011 10.48.30 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.
10:48:37,181  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/repository.properties]
10:48:37,183  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/domain/transaction.properties]
10:48:37,183  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from URL [file:/usr/local/tomcat48/webapps/alfresco/WEB-INF/classes/alfresco-global.properties]
10:48:37,243  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
10:49:23,080  WARN  [factory.support.DefaultListableBeanFactory] Encountered FactoryBean creation exception for bean 'categoryService' - couldn't check type! org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'categoryService' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: PermGen space
10:49:43,698  WARN  [factory.support.DefaultListableBeanFactory] Encountered FactoryBean creation exception for bean 'CategoryService' - couldn't check type! org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'CategoryService' defined in class path resource [alfresco/public-services-context.xml]: Cannot resolve reference to bean 'categoryService' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'categoryService' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: PermGen space
10:50:28,138  WARN  [factory.support.DefaultListableBeanFactory] Encountered FactoryBean creation exception for bean 'CheckoutCheckinService' - couldn't check type! org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'CheckoutCheckinService' defined in class path resource [alfresco/public-services-context.xml]: Cannot resolve reference to bean 'checkOutCheckInService' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'checkOutCheckInService' defined in class path resource [alfresco/core-services-context.xml]: Instantiation of bean failed; nested exception is java.lang.OutOfMemoryError: PermGen space
Exception in thread "http-8080-24" java.lang.OutOfMemoryError: PermGen space
4-apr-2011 10.51.20 org.apache.catalina.connector.CoyoteAdapter service
GRAVE: An exception or error occurred in the container during the request processing
java.lang.OutOfMemoryError: PermGen space

The underlying machine has 2GB of memory allocated to Tomcat/Alfresco and the only solution to get the service restart seems to be rebooting the whole system (just rebooting Tomcat does not solve the problem). Any idea about what could have produced this problem?

Thanks.
5 REPLIES 5

mrogers
Star Contributor
Star Contributor
Yes you are out of "PermGen" space.

fluca1978
Champ in-the-making
Champ in-the-making
Uhm…but the PermGen space should be filled with classes metadata, that is it should not be filled if the running code base is constant along time, right? In my alfresco instance I'm running only an application with web services deployed as a Tomcat war. This means that the code base is not changing along time, so the PermGen should not be filled as the application runs, right?
Moreover I found that executing the uploading with a block of 2000 documents the system works fine, while with a single chunk of 12000 produces the out of memory. So the only thing changing is the size of uploading data, not the running code. Could it be a leak in the Alfresco itself? Or am I getting all wrong here and don't get the problem?

Just for the record: my maxPermSize is set to 128 MB.

Thanks.

mrogers
Star Contributor
Star Contributor
If you have 2GB allocated to Alfresco then a permgen of 128M is far too small.   At least double it.  

Its not worth going into details while your system is mis-configured.

fluca1978
Champ in-the-making
Champ in-the-making
Ok, thanks, I'll double it.
I was using the configuration explained here as starting point http://wiki.alfresco.com/wiki/JVM_Tuning.

Thanks

fluca1978
Champ in-the-making
Champ in-the-making
After having doubled the size of PermGen I've noted that also upload times have doubled. Is this a direct consequence of such configuration parameter?