We found that the system is frequently running out of memory, running Full GC did not help to reclaim the memory. We then take a heap dump an analyse the contents.
JSF implementation name/version Mojarra 2.1.28-jbossorg-2 Server name/version : JBoss EAP 6.3
We found some HTTP sessions are holding more than 2GB of memory. A screen dump of the dominator_tree from the MAT is attached in the following link
https://drive.google.com/file/d/1zX1xHzpXBacrDuSNrS2Dp1kVUDm00uku/view?usp=sharing
It shows that there are many org.primefaces.component.tabview.TabView
components (about 360 of them) , each referring to 5M to 9M of memory and refers to a particular set of UI in the system !
I raised a question in the primefaces forum and it is suggested that the problem may be related to JSF bindings.
I checked with the source of the page and it contains:
<f:actionListener binding="#{CourseInfoManagedBean.initBatchUpload()}"/>
where CourseInfoManagedBean is a @ViewScoped
bean.
Will that cause memory leak ?
Moreover, why those org.primefaces.component.tabview.TabView
UI components are created directly under the org.apache.catalina.session.StandardSession
rather than under the com.sun.faces.util.LRUMap
?