cancel
Showing results for 
Search instead for 
Did you mean: 

OutOfMemoryError: Java heap space

hedi_ad
Champ on-the-rise
Champ on-the-rise
Hello,

I have a problem with alfresco community 4.2.f that is installed on windows server 2008 R2.

the problem is that alfresco crashes and I can not access the web interface (tomcat)
so I thought that the problem is due to the configuration PermSize, so I configured as follows this file "C:\Alfresco\tomcat\bin\setenv.bat":

set JAVA_OPTS=++JvmOptions="-XX:-DisableExplicitGC" ++JvmOptions="-XX:ReservedCodeCacheSize=128m" –JvmMs 128 –JvmMx 768 ++JvmOptions=" -Xms2g -Xmx10g -server -XX:MaxPermSize=1g" %JAVA_OPTS%

similarly, I modified the registry "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\alfrescoTomcat\Parameters\Java\option":

-Xms2048M
-Xmx10240M
-Dalfresco.home=C:\Alfresco
-Dcom.sun.management.jmxremote
-Dcatalina.base=C:\Alfresco\tomcat
-Dcatalina.home=C:\Alfresco\tomcat
-Djava.endorsed.dirs=C:\Alfresco\tomcat\endorsed
-Djava.io.tmpdir=C:\Alfresco\tomcat\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=C:\Alfresco\tomcat\conf\logging.properties
-XX:-DisableExplicitGC
-XX:ReservedCodeCacheSize=128m
-XX:MaxPermSize=512M

but the problem still persists, here is the error that appears in alfresco.log


01:36:06,271 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 09210010 Wrapped Exception (with status template): 09211708 Error during processing of the template 'Java heap space'. Please contact your system administrator.
org.springframework.extensions.webscripts.WebScriptException: 09210010 Wrapped Exception (with status template): 09211708 Error during processing of the template 'Java heap space'. Please contact your system administrator.
   at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1067)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171)
   at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:422)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:452)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:491)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:529)
   at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:268)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:378)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
   at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:610)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
   at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: org.alfresco.service.cmr.repository.TemplateException: 09211708 Error during processing of the template 'Java heap space'. Please contact your system administrator.
   at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:222)
   at org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:896)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:267)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)
   … 31 more
Caused by: java.lang.OutOfMemoryError: Java heap space


any help will be apreciated.

Hedi Adouni,
Open Source Consultant

13 REPLIES 13

angelborroy
Community Manager Community Manager
Community Manager
It seems an error with your LDAP-AD synchronization. What kind of configuration are you applying on this?
Hyland Developer Evangelist

don't think that the error of GC overhead limit exceeded is caused by the LDAP-AD synchronization, to be sure, I will check again my configuration and resolve the error of AD synchronization, and after what will be happening.


angelborroy
Community Manager Community Manager
Community Manager
Can you include the night log after resolving AD synchronization error?
Hyland Developer Evangelist

I did the modification today in morning, tomorrow I will post the log