- Interact uses ehcache to store session data which uses heap memory
- Flowchart and process box threads use native memory i.e. outside of heap memory
- Interact clears threads and sessions from memory only if one of the following happens
- Interact configuration parameter maxEntriesInCache has the default value of 100000. Interact will trigger clean-up of sessions from memory only after these many objects are created. Many times, web app heap memory and native memory are exhausted before this limit is reached.
- Interact clears sessions if ‘endsession’ is executed within the session’s timeout period
- ExpiryReclaimPeriod can be set in Interact configuration. This is set in minutes like 5 minutes and defines the frequency of execution of ehcache session evictor. This parameter needs to be added manually and is effective from v188.8.131.52. It was also added in v9.1.0 from fix pack 6.
- During high load, the many sessions remain in an active state in memory and are never cleared by any of the three methods discussed above. By setting maxEntriesInCache to a small value such as 10000 or lower, it will force Interact to clean sessions and bring the count of objects in memory under that value thus preventing out of memory situation.
- How do we monitor and know the number of sessions in Interact memory?
ActiveSessionCount parameter that is in JMX sweep is wrong and useless and soon may be removed from the product. It comes down only when endsession is executed. It does not reduce session eviction or garbage collection.
The parameter that should be monitored for number of objects in memory is MemoryStoreObjectCount under section in JMX Sweep report – http://Interact host:port/interact/jsp/jmxsweep.jsp
- Engineering has identified a defect HMA-287431 where Interact does not utilize core pool of threads and keeps those threads idle and unused leading to native memory exhaustion. This issue will be fixed in 11.1. After applying this fix, I have observed that Interact is also able to remove expired and old sessions from memory and bringing down MemoryStoreObjectCount to 0.
- Websphere can be set to use higher amount of native memory by adding JVM argument -Xgc:preferredHeapBase=0x100000000. Please be careful about this step. If only this one is applied without anything else, this can cause Interact to consume entire physical memory of the machine and crash web app.
In case any customer reports web app crash in Interact. Provide the following recommendations:
- Set maxEntriesInCache to low value such as 10000 or lower.
- If client expects load higher than 10000 within the session timeout set, it will require higher heap memory and native memory – this requires a sizing exercise.
- Set GC JVM parameters -XX:+UseConcMarkSweepGC -Xmn512m -XX:SurvivorRatio=6
- Request hotfix for defect HMA-287431
Set JVM argument -Xgc:preferredHeapBase=0x100000000. Please be careful about this step. If the above 4 are not applied and only this one is applied, this can cause Interact to consume entire physical memory.
Marketing Automation Software Support
Interact is a trademark of IBM Corporation, registered in many jurisdictions, and is used under license.