2 Replies Latest reply on Sep 8, 2009 7:57 AM by pk3269

    jboss server 4.0 OutOFMemory error

      Using jboss 4.0.5 server, I am working on a Java/JSP application which is heavily database dependent. I need to export a report's data in xls file, for this I am using a utility jar file.

      PROBLEM: While exporting report to excel file, when the data is less than 9000 records the file is easily exported. But the system aborts the process when the record strength is more than that.

      If I write a csv file also the same problem exists. It seams that the problem is due to JVM heap size, see the log below-

      2009-08-11 06:31:08,109 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/qhWRA].[ReportServlet]] Servlet.service() for servlet ReportServlet threw exception

      java.lang.OutOfMemoryError: Java heap space


      I need a solution to overcome this issue.

      I have already tried the following options:

      OPTION 1. By changing the statement in run.conf file at location /jboss-4.0.5/bin as follows:

      By replacing

      if [ "x$JAVA_OPTS" = "x" ] then

      JAVA_OPTS="-Xms256m -Xmx1024m -Duser.timezone=America/Los_Angeles"

      JAVA_OPTS="$JAVA_OPTS -Dsun.rmi.dgc.client.gcInterval=3600000"

      fi



      with



      JAVA_OPTS="-Xms1024m -Xmx1024m -Duser.timezone=America/Los_Angeles"

      JAVA_OPTS="$JAVA_OPTS -Dsun.rmi.dgc.client.gcInterval=3600000"





      OPTION 2. By changing the statement in run.bat file at location /appl/jboss-4.0.5/bin as follows:



      By replacing



      set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m



      with



      set JAVA_OPTS=%JAVA_OPTS% -Xms1024m –Xmx1024m



      OR



      set JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx1024m

      set JAVA_OPTS=%JAVA_OPTS% -XX:PermSize=1024m -XX:MaxPermSize=1024m





      but no solution found.



      Please if anybody can help....



      Thanks and Regards,
      Pawan Kumar

        • 1. Re: jboss server 4.0 OutOFMemory error
          peterj

          You never said if you were running Linux or Windows. The run.bat file is used only on Windows and the run.conf file only on Linux.

          I will make a guess based on your use of '/' as a path separator that you are running on Linux. Changing the -Xm size is insufficient - you need to increase the -Xm size. Try using -Xm1500m in run.conf.

          • 2. Re: jboss server 4.0 OutOFMemory error

            Thanks Peter.

            We are using Linux.

            We have tried for -Xm2048m also.

            Is there any other option/solution to this?

            Thanks in advance.
            Pawan.