Is there any way/tool to profile per-session memory usage in a Java web application?
More specifically I'm using Seam and I have a few objects which are specific for the user or for the user's current session so they're set to be stored in the user's session.
Some time ago my application would run out of memory when hitting a certain number of users so I moved various things out of the session and profiled until I got the memory down. However the memory measurements were at the JVM level. I'd really like a way to monitor memory usage on session level, excluding any non-session memory usage.
Nice to have:
- Total memory usage for http sessions (which I can compare to whole application memory usage)
- Per-session memory usage, even averages.