Uploaded image for project: 'Newsletter'
  1. Newsletter
  2. NEWSLETTER-254

Out of memory error when sending newsletter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 2.0.0
    • None
    • None

      Unable to send a newsletter, upon validation the generation of the body never ends ( org.ametys.plugins.newsletter.workflow.SendNewsletterFunction._getBodyAsHtml(DefaultWebContent) ), resulting in 100% CPU during the process, then a "java.lang.OutOfMemoryError: Java heap space"

      Steps : Create a new newsletter category, subscribe to it with the "add subscribers" popup, set the default template, create a new newsletter, validate it without changing its content.

      After a few minutes, the following error appears in the logs :

      Date:			Wed May 04 10:13:34 CEST 2016 (1462349614476)
      Thread:		http-nio-8400-exec-10
      Message #:	3452
      Level:		ERROR
      NDC:			
      Category:	org.ametys.plugins.core.ui
      Message:		Can not dispatch request '2' : 'cms' 'do-action/4' '{contentId=defaultWebContent://b0361ce5-e1ed-4de4-ba50-fe61d0286e0a, id=defaultWebContent://b0361ce5-e1ed-4de4-ba50-fe61d0286e0a, with-contents=/_plugins/cms/contents/info, send=true}'
      Location:	org.apache.cocoon.util.log.SLF4JLoggerAdapter.error(SLF4JLoggerAdapter.java:46)
      Thrown:
      org.apache.cocoon.util.location.LocatedException: Can not dispatch request '2' : 'cms' 'do-action/4' '{contentId=defaultWebContent://b0361ce5-e1ed-4de4-ba50-fe61d0286e0a, id=defaultWebContent://b0361ce5-e1ed-4de4-ba50-fe61d0286e0a, with-contents=/_plugins/cms/contents/info, send=true}'
      	at org.ametys.core.ui.dispatcher.DispatchGenerator._dispatching(DispatchGenerator.java:171)
      	at org.ametys.core.ui.dispatcher.DispatchGenerator.generate(DispatchGenerator.java:88)
      	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:581)
      	at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:301)
      	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:483)
      	at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:144)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
      	at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:178)
      	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
      	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
      	at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:178)
      	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
      	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
      	at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:178)
      	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
      	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
      	at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236)
      	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:178)
      	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
      	at org.apache.cocoon.Cocoon.process(Cocoon.java:699)
      	at org.ametys.runtime.servlet.RuntimeServlet.service(RuntimeServlet.java:537)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
      	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.OutOfMemoryError: Java heap space
      	at org.apache.xml.dtm.ref.DTMDefaultBase.ensureSizeOfIndex(DTMDefaultBase.java:302)
      	at org.apache.xml.dtm.ref.DTMDefaultBase.indexNode(DTMDefaultBase.java:328)
      	at org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.addNode(DOM2DTM.java:298)
      	at org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.nextNode(DOM2DTM.java:523)
      	at org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.getNextNodeIdentity(DOM2DTM.java:638)
      	at org.apache.xml.dtm.ref.DTMDefaultBase.getNextAttributeIdentity(DTMDefaultBase.java:1232)
      	at org.apache.xml.dtm.ref.DTMDefaultBase.getNextAttribute(DTMDefaultBase.java:1214)
      	at org.apache.xpath.axes.AttributeIterator.getNextNode(AttributeIterator.java:56)
      	at org.apache.xpath.axes.BasicTestIterator.nextNode(BasicTestIterator.java:170)
      	at org.apache.xpath.axes.NodeSequence.nextNode(NodeSequence.java:335)
      	at org.apache.xpath.axes.NodeSequence.item(NodeSequence.java:530)
      	at org.apache.xpath.objects.XNodeSet.bool(XNodeSet.java:189)
      	at org.apache.xpath.axes.PredicatedNodeTest.executePredicates(PredicatedNodeTest.java:390)
      	at org.apache.xpath.axes.PredicatedNodeTest.acceptNode(PredicatedNodeTest.java:479)
      	at org.apache.xpath.axes.AxesWalker.nextNode(AxesWalker.java:372)
      	at org.apache.xpath.axes.WalkingIterator.nextNode(WalkingIterator.java:195)
      	at org.apache.xpath.axes.LocPathIterator.asNode(LocPathIterator.java:302)
      	at org.apache.xpath.axes.LocPathIterator.bool(LocPathIterator.java:320)
      	at org.apache.xpath.XPath.bool(XPath.java:412)
      	at org.apache.xalan.templates.ElemIf.execute(ElemIf.java:160)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:394)
      	at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:248)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemIf.execute(ElemIf.java:162)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:394)
      	at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:248)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
      
      

            Unassigned Unassigned
            glefebvre Grégory Lefebvre (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: