EAP SimpleCache is filling with StatefulSessionComponentInstances after updating to EAP 7.4.0+
Environment
- JBoss Enterprise Application Platform (EAP) 7.4.0+
Issue
- After updating to EAP 7.4.0+, we are seeing gradual heap use accumulation till OOME in many
org.jboss.as.ejb3.component.stateful.StatefulSessionComponentInstances accumulated in aorg.jboss.as.ejb3.cache.simple.SimpleCache
Resolution
- Await a fix in future EAP updates
Root Cause
- The SimpleCache only schedules expiration after a session instance is used and released. So if a session is created but never used, it is never released. 7.4.0 added a new scenario where sessions are automatically created so these can be a source of new session creations for leaks if they are not ever used
- This content is not included.WFLY-20311
- This content is not included.JBEAP-28932
- This content is not included.JBEAP-29013
Diagnostic Steps
- From a heap dump, check the following OQL values in a heap dump. If there are large growing differences between these values with fewer scheduler entries, then this indicates growing amounts of cache entries leaked in this manner without a scheduled expiration:
SELECT entries.baseCount, scheduler.entries.tokens.baseCount FROM org.jboss.as.ejb3.cache.simple.SimpleCache
SBR
Components
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.