Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-15355

Notification Jobs throw OOMemory Exception

    XMLWordPrintable

Details

    • Bug
    • Resolution: Solved By
    • Major
    • None
    • 10.4
    • Notifications
    • Tomcat 8 3GB heap space configured, MySQL, Debian Linux
    • Unknown

    Description

      When having to send lots of notification emails the Job Scheduler seems run out of memory. Since we are currently reorganizing the structure, this has become a quite regular case, which is a little annoying, since I have to restart the XWiki application. Unfortunately the application server does not like this at all and XWiki becomes unresponsive. For now I have to disable the email jobs.

      2018-06-14 08:13:57,952 [DefaultQuartzScheduler_Worker-5] ERROR o.q.c.ErrorLogger - Job (DEFAULT.xwiki:Scheduler.NotificationEmailHourlySender_0 threw an exception. 
      org.quartz.SchedulerException: Job threw an unhandled exception.
       at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
       at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
      Caused by: java.lang.OutOfMemoryError: Java heap space

      Furthermore:

      Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'parseTemplate' in  class com.xpn.xwiki.api.XWiki threw exception java.lang.OutOfMemoryError: Java heap space at /templates/macros.vm[line 20, column 8]
      	at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:261)
      	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:187)
      	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
      	at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:369)
      	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
      	at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:216)
      	at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:311)
      	at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:230)
      	at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)
      	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
      	at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
      	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
      	at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:216)
      	at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:311)
      	at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:230)
      	at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)
      	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
      	at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
      	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
      	at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:216)
      	at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:311)
      	at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:230)
      	at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)
      	at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
      	at org.apache.velocity.runtime.parser.node.ASTStringLiteral.value(ASTStringLiteral.java:330)
      	at org.apache.velocity.context.ProxyVMContext.get(ProxyVMContext.java:259)
      	at org.apache.velocity.runtime.parser.node.ASTReference.getVariableValue(ASTReference.java:991)
      	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:240)
      	at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:369)
      	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
      	at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:216)
      	at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:311)
      	at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:230)
      	at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)
      	at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
      	at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluateInternal(DefaultVelocityEngine.java:259)
      	at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:222)
      	... 19 common frames omitted
      Caused by: java.lang.OutOfMemoryError: Java heap space
      

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              zonradkuse Johannes Neuhaus
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: