AnsweredAssumed Answered

[Solved] Error during run with lock, Java Heap space

Question asked by dranakan on Nov 9, 2009
Latest reply on Nov 6, 2012 by rasara_1
Hello,

I have recently add a lot of documents for tests ("ls -R * | wc -w" in contentStore gives 216010) but Alfresco (3.0 (Stable 1526) schema 1002 with DB Ingres 9.2) is not able to restart :-(

I think about a lake of memory… I hope that it is not…

I have 3 GB and my  JAVA_OPTS arguments for JVM (http://wiki.alfresco.com/wiki/JVM_Tuning) are :
export JAVA_OPTS='-server -Xcomp -Xbatch -Xss1024K -Xms1G -Xmx2g -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:NewSize=512m -XX:MaxPermSize=128M -XX:CMSInitiatingOccupancyFraction=80'

Before starting Alfresco, the memory use is :
[alfresco@localhost Alfresco3]$ free -m
             total       used       free     shared    buffers     cached
Mem:          2971        834       2137          0         31        681
-/+ buffers/cache:        121       2849
Swap:         3059        858       2200

catalina.out

INFO: Stopping Coyote HTTP/1.1 on http-8080
CompilerOracle: exclude org/apache/lucene/index/IndexReader$1.doBody
CompilerOracle: exclude org/alfresco/repo/search/impl/lucene/index/IndexInfo$Merger.mergeIndexes
CompilerOracle: exclude org/alfresco/repo/search/impl/lucene/index/IndexInfo$Merger.mergeDeletions
Nov 9, 2009 1:49:57 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Nov 9, 2009 1:49:58 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 4734 ms
Nov 9, 2009 1:49:59 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Nov 9, 2009 1:49:59 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
Nov 9, 2009 1:49:59 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war
Nov 9, 2009 1:50:09 PM 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.
13:50:55,969  ERROR [transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to perform ImageMagick transformation:
Execution result:
   os:         Linux
   command:    [/usr/local/bin/convert, /opt/Alfresco3/tomcat/temp/Alfresco/ImageMagickContentTransformer_init_source_676250879432461320.gif, /opt/Alfresco3/tomcat/temp/Alfresco/ImageMagickContentTransformer_init_target_3815583309748912250.png]
   succeeded:  false
   exit code:  1
   out:
   err:        Cannot run program "/usr/local/bin/convert": java.io.IOException: error=2, No such file or directory
13:51:03,562  INFO  [config.xml.XMLConfigService$PropertyConfigurer] Loading properties file from class path resource [alfresco/file-servers.properties]
13:51:07,841  DEBUG [alfresco.repo.jscript] preRegister called. Server=com.sun.jmx.mbeanserver.JmxMBeanServer@1af2a9c, name=log4j:logger=org.alfresco.repo.jscript
13:51:07,843  DEBUG [ch.custom.manageoffice] preRegister called. Server=com.sun.jmx.mbeanserver.JmxMBeanServer@1af2a9c, name=log4j:logger=ch.custom.manageoffice
13:51:20,642  ERROR [content.transform.RuntimeExecutableContentTransformer] Failed to start a runtime executable content transformer:
Execution result:
   os:         Linux
   command:    [/opt/Alfresco3/bin/pdf2swf, -V]
   succeeded:  false
   exit code:  1
   out:
   err:        Cannot run program "/opt/Alfresco3/bin/pdf2swf": java.io.IOException: error=2, No such file or directory
13:51:38,132  INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.IngresDialect.
13:51:38,190  INFO  [domain.schema.SchemaBootstrap] Bypassing schema update checks.
### Excluding compile: org.apache.lucene.index.IndexReader$1::doBody
13:52:51,677  ERROR [web.context.ContextLoader] Context initialization failed
java.lang.RuntimeException: Error during run with lock.
at org.alfresco.repo.search.impl.lucene.index.IndexInfo.doWithFileLock(IndexInfo.java:2251)
        at org.alfresco.repo.search.impl.lucene.index.IndexInfo.<init>(IndexInfo.java:557)
        at org.alfresco.repo.search.impl.lucene.index.IndexInfo.getIndexInfo(IndexInfo.java:351)
        at org.alfresco.repo.search.impl.lucene.AbstractLuceneBase.initialise(AbstractLuceneBase.java:106)
        at org.alfresco.repo.search.impl.lucene.ADMLuceneSearcherImpl.getSearcher(ADMLuceneSearcherImpl.java:129)
        at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerAndSearcherFactory.getSearcher(ADMLuceneIndexerAndSearcherFactory.java:116)
        at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerAndSearcherFactory.getSearcher(AbstractLuceneIndexerAndSearcherFactory.java:463)
        at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerAndSearcherFactory.getSearcher(AbstractLuceneIndexerAndSearcherFactory.java:87)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:221)
        at $Proxy27.getSearcher(Unknown Source)
        at org.alfresco.repo.search.SearcherComponent.selectNodes(SearcherComponent.java:107)
        at org.alfresco.repo.search.AbstractSearcherComponent.selectNodes(AbstractSearcherComponent.java:77)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
        at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
        at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:275)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy20.selectNodes(Unknown Source)
        at org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap.initDictionary(DictionaryRepositoryBootstrap.java:242)
        at org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap$1.execute(DictionaryRepositoryBootstrap.java:207)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:320)
        at org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap.init(DictionaryRepositoryBootstrap.java:203)
        at org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap$2.doWork(DictionaryRepositoryBootstrap.java:395)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:437)
        at org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap.onBootstrap(DictionaryRepositoryBootstrap.java:391)
        at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
        at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
        at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:246)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
        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:525)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.OutOfMemoryError: Java heap space
        at org.apache.lucene.store.RAMFile.addBuffer(RAMFile.java:63)
        at org.apache.lucene.store.RAMOutputStream.flushBuffer(RAMOutputStream.java:80)
        at org.apache.lucene.store.BufferedIndexOutput.flush(BufferedIndexOutput.java:85)
        at org.apache.lucene.store.BufferedIndexOutput.writeBytes(BufferedIndexOutput.java:53)
        at org.apache.lucene.store.Directory.copy(Directory.java:172)
        at org.apache.lucene.store.RAMDirectory.<init>(RAMDirectory.java:73)
        at org.apache.lucene.store.RAMDirectory.<init>(RAMDirectory.java:84)
        at org.alfresco.repo.search.impl.lucene.index.IndexInfo.buildReferenceCountingIndexReader(IndexInfo.java:1926)
        at org.alfresco.repo.search.impl.lucene.index.IndexInfo.access$1200(IndexInfo.java:127)
        at org.alfresco.repo.search.impl.lucene.index.IndexInfo$2.doWork(IndexInfo.java:618)
        at org.alfresco.repo.search.impl.lucene.index.IndexInfo.doWithFileLock(IndexInfo.java:2320)
        at org.alfresco.repo.search.impl.lucene.index.IndexInfo.doWithFileLock(IndexInfo.java:2240)
        at org.alfresco.repo.search.impl.lucene.index.IndexInfo.<init>(IndexInfo.java:557)
        at org.alfresco.repo.search.impl.lucene.index.IndexInfo.getIndexInfo(IndexInfo.java:351)
        at org.alfresco.repo.search.impl.lucene.AbstractLuceneBase.initialise(AbstractLuceneBase.java:106)
        at org.alfresco.repo.search.impl.lucene.ADMLuceneSearcherImpl.getSearcher(ADMLuceneSearcherImpl.java:129)
        at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerAndSearcherFactory.getSearcher(ADMLuceneIndexerAndSearcherFactory.java:116)
        at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerAndSearcherFactory.getSearcher(AbstractLuceneIndexerAndSearcherFactory.java:463)
        at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerAndSearcherFactory.getSearcher(AbstractLuceneIndexerAndSearcherFactory.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:221)
        at $Proxy27.getSearcher(Unknown Source)
        at org.alfresco.repo.search.SearcherComponent.selectNodes(SearcherComponent.java:107)
        at org.alfresco.repo.search.AbstractSearcherComponent.selectNodes(AbstractSearcherComponent.java:77)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
Nov 9, 2009 1:52:51 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Nov 9, 2009 1:52:52 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.
Nov 9, 2009 1:52:59 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Nov 9, 2009 1:52:59 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 181209 ms


I have tried differents arguments… but I get always the same message…
What can I do :?:
The memory is depending of the amouts of documents in Alfresco  :?:
I can't increase the memory more than 2G because I use 32bits (limitation of the JVM).

Thanks

Outcomes