Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-2106

OutOfMemoryError when starting a high number of process instances with timers

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 7.2.1.GA, 7.3.0.GA
    • Fix Version/s: 7.4.0.GA
    • Component/s: jBPM Core
    • Labels:
    • Environment:
      • RHPAM 7.3.0
      • OpenJDK 1.8.0_201
      • -Xmx4g, -Xms4g
      • MySQL persistence for kie-server
      • EJB timers with DB persistence (mysql)
      • Simple process with two timers (duration=10m)

      Description

      In a load test that starts 80k process instances containing a timer, the server runs into an OutOfMemoryError before all instances are being created. The heap dump shows a GlobalJpaTimerJobInstance for each created process instance:

      Class Name                                          | Objects | Shallow Heap |    Retained Heap
      ------------------------------------------------------------------------------------------------
      org.jbpm.persistence.timer.GlobalJpaTimerJobInstance|  74,476 |    2,979,040 | >= 1,579,625,808
      ------------------------------------------------------------------------------------------------
      

      These instances are held in memory by the EJBTimerScheduler.localCache:

      Class Name                                                                           | Shallow Heap | Retained Heap
      --------------------------------------------------------------------------------------------------------------------
      org.jbpm.persistence.timer.GlobalJpaTimerJobInstance @ 0x75554b718                   |           40 |        21,304
      |- val java.util.concurrent.ConcurrentHashMap$Node @ 0x75554b6b0                     |           32 |            32
      |  '- next java.util.concurrent.ConcurrentHashMap$Node @ 0x6fb98d5c8                 |           32 |            64
      |     '- [68975] java.util.concurrent.ConcurrentHashMap$Node[131072] @ 0x7301737d0   |      524,304 |     9,979,408
      |        '- table java.util.concurrent.ConcurrentHashMap @ 0x6d353b998               |           64 |     9,979,544
      |           '- localCache org.jbpm.services.ejb.timer.EJBTimerScheduler @ 0x6d353b980|           24 |     9,979,568
      --------------------------------------------------------------------------------------------------------------------
      

      The EJBTimerScheduler.localCache has been added in RHBPMS-4762 to address a performance issue in Websphere.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                swiderski.maciej Maciej Swiderski
                Reporter:
                mputz Martin Weiler
                Tester:
                Marian Macik
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: