3 Replies Latest reply on Apr 17, 2007 8:17 PM by genman

    Is there a way to view the size of HTTP sessions in JBoss?

    thirtybelowzero

      Does anyone know how to view the size of individual sessions in JBoss? I can view the number of sessions listed by web application in the Management Console, but it does not contain individual session information. Any ideas or suggestions are very much appreciated.

      Thanks in advance,
      B

        • 1. Re: Is there a way to view the size of HTTP sessions in JBos
          genman

          Size, meaning memory utilization -- or disk size?

          If you use session caching with JBoss Cache, the persistence mechanism stores the data on the file system.

          In memory -- you would have to use some sort of profiler to see the precise sizes at this time.

          • 2. Re: Is there a way to view the size of HTTP sessions in JBos
            thirtybelowzero

            I guess by size (though admittedly they may be slightly different) I mean the actual size of the session as stored in memory or on disk.

            Here's a little background:
            I'm helping to test an application that seems to be storing a large amount of data in the HTTP session. During the test, after a number of login/logout sequences (about 70), we start to see OutOfMemory errors. The Heap size is currently set to 512 MB. If I decrease the session timeout to a very low value (3 min.), and rerun the test, everything works fine and the memory is ok. I interpret this behavior to mean that the session size is getting large (ie. 70 sessions/450M is approx. 6.4 MB per session), and as long as I time them out before the test completes, we don't run out of memory. Since I'm not really accounting for the other processes that may be running, this is probably not a very good estimate, so I'm looking for a way to view these within JBoss to get a better estimate of the actual session size.

            B

            • 3. Re: Is there a way to view the size of HTTP sessions in JBos
              genman

              Look for an MBean called jboss.cache:service=TomcatClusteringCache

              See
              http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossCacheMBeans

              Different eviction strategies might be configured here.

              But you might be experiencing some sort of leak anyway. You should get a memory profiler (download a trial) and take a look at what's hogging memory.