Question

I have a web application build on Mojarra (JSF 2). The application is deployed on WebSphere 7. The session usage for my application is very high. I use view scoped beans and some of the pages are considerably large. My web xml is configured to keep 5 views in session.

<context-param>
  <param-name>com.sun.faces.numberOfViewsInSession</param-name>
  <param-value>5</param-value>
</context-param>
<context-param>
  <param-name>com.sun.faces.numberOfLogicalViews</param-name>
  <param-value>5</param-value>
</context-param>

I am not explicitly adding anything to session. Still some of the sessions in my application is as large as 60 MB.

When I do a hepdump analysis it shows the session hashmap is taking all the memory. Is there a way to identify what exactly is there in session store?

E.g. The retained heap com.ibm.ws.session.store.memory.MemorySession @ 0x700000057890108 for memory store xxx at /xxx/yyy is 66209288.

Was it helpful?

Solution

If you analyze your heap dump with , you should be able to drill down your com.ibm.ws.session.store.memory.MemorySession to find the culprit, as explained in this blog entry: Richfaces Sessions Eating Memory – Analysis of a Memory Leak

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top