2 Replies Latest reply on Aug 28, 2002 11:13 AM by spari

    java.lang.OutOfMemoryError

    affcv

      Hello,


      Sometimes, when using jBoss more exhaustively (like querying the DB) it "blows up", with the error: "java.lang.OutOfMemoryError". Is this a common problem? Do I need to enlarge the heap space to overcome this? How do I do that?

      I have JBoss-2.2.2, with tomcat-3.2.2, Java 1.3.1_01 and a mySQL DB.

      Thanks!

      Andre

        • 1. Re: java.lang.OutOfMemoryError
          u1a8a8

          You probably need to increase the heap size given to your jvm. Here is a snippet of my run.sh:


          # increase heap size to 512 meg
          MEMORY=-Xmx512m

          echo JBOSS_CLASSPATH=$JBOSS_CLASSPATH
          java $HOTSPOT $JAXP $DEBUG $MEMORY -classpath $JBOSS_CLASSPATH org.jboss.Main $@


          This is a unix or cygwin configuration, the modifications to run.bat for windows are very similar.

          Nick.

          • 2. Re: java.lang.OutOfMemoryError
            spari

            The memory exception is most likely from a jdk bug, that is if you are using Sun's jdk 1.3.1_01. http://developer.java.sun.com/developer/bugParade/bugs/4504200.html

            I had the same out of memory exception problem, after certain loads it was very persistent. (jboss 2.4.8, tomcat 3.2.3).

            Upgrading to jdk 1.3.1_04 fixed it.

            Pari Shanmugam