3 Replies Latest reply on Jan 10, 2008 1:39 PM by Peter Johnson

    jboss420GA, Out of memory, with -Xmx1300m -XX:PermSize=378M

    Andy Brook Newbie

      Hi,
      I'm running one web-application inside jboss4.2.0GA, the application is Confluence. This application reports a Total Memory size of 353MB, Jboss Admin Console contains the following:

      JVM Environment
      Free Memory: 91 MB
      Max Memory: 1251 MB
      Total Memory: 354 MB
      #Threads: 85
      JVM Version: 1.6.0_03-b05 (Sun Microsystems Inc.)
      JVM Name: Java HotSpot(TM) Server VM
      
      
      
      Have I missed something really basic in how memory gets allocated to web applications? the 354 MB 'total' reported by Jboss is near enough what confluence is reporting.
      
      Confluence is running out of memory, so it looks like a Jboss tweak is required somewhere, but I have no clue where. Anyone have an idea?
      
      Thanks,
      Andy.


        • 1. Re: jboss420GA, Out of memory, with -Xmx1300m -XX:PermSize=3
          Peter Johnson Master

          The JVM heap sizes are set inside the run scripts. Look for the JAVA_OPTS settings containing -Xms and -Xmx.

          • 2. Re: jboss420GA, Out of memory, with -Xmx1300m -XX:PermSize=3
            Andy Brook Newbie

            Thanks but that's been done, the problem is that by setting those values (in subject) my web application still only sees 353MB total memory as opposed to 1G+ that should be available.

            I'm getting out of memory errors during high load (complex page/backup etc) but I cant figure out where / if there are any internal jboss settings for memory allocation to web application etc....

            my jboss startup screen looks like:


            ===============================================================================

            JBoss Bootstrap Environment

            JBOSS_HOME: D:\apps\jboss-4.2.0.GA

            JAVA: d:\apps\jdk1.6.0_03\bin\java

            JAVA_OPTS: -Dprogram.name=run.bat -server -Xmx1300m -XX:MaxPermSize=378m -XX:PermSize=378M -Dsun.rmi.dgc.client.gcInterval=360000 -Dsun.rmi.dgc.server.gcInterval=360000 -Djava.awt.headless=true -Dcom.sun.management.jmxremote

            CLASSPATH: d:\apps\jdk1.6.0_03\lib\tools.jar;D:\apps\jboss-4.2.0.GA\bin\run.jar

            ===============================================================================


            • 3. Re: jboss420GA, Out of memory, with -Xmx1300m -XX:PermSize=3
              Peter Johnson Master

              Sorry, I never looked at the subject line.

              I suggest you also set -Xms1300m. This will set the min and max heap to the same size (as it is, you are probably getting an initial heap of 64m, with the JVM constantly asking the OS for more). This will also prevent you from getting "out of memory" errors if the JVM asks the OS for more memory and the OS refuses to allocate it.

              Also, try running with -verbose:gc set, this should show you the amounts of heap in use before and after each garbage collection. Relying on the OS to tell you about the JVMs memeory usage is usually not too helpful.

              Also, I hope that you have at least 2GB of RAM on your machine. Otherwise you might not be able to get a 1.3GB heap.