-
Bug
-
Resolution: Done
-
Critical
-
7.2.1.GA, 7.3.0.GA
-
- 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)
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.