2 Replies Latest reply on Jul 14, 2006 9:22 AM by Jayan Kandathil

    JBoss 3.2.5 fails startup with -Xmx1536m

    Jayan Kandathil Newbie

      Hello:

      We are running JBoss AS 3.2.5 with Sun J2SE 1.4.2_12 (32-bit) on Windows Server 2003 Enterprise Edition SP1 (also 32-bit). Setting the JVM to -Xmx1024m in run.bat works fine but setting it to -Xmx1536m causes JBoss not to start. The error in the console is this:
      Error occurred during initialization of VM
      Could not reserve enough space for object heap

      Press any key to continue . . .

      The box is dedicated to this single JBoss instance and has 4 GB of RAM. We're using the "all" configuration. Any help would be much appreciated. Thanks in advance.

      - Jayan

      Jayan Kandathil
      Adobe Systems Canada

        • 1. Re: JBoss 3.2.5 fails startup with -Xmx1536m
          Peter Johnson Master

          The Sun JVM attempts to allocate a contiguous section of memory from its available address space. Considering that on a 32-bit box you have only 2GB of available address per process, and that typical application stuff (code and whatnot) takes up low memory space and that the majority of the Windows DLLs take up high memory, you will end up with a significantly smaller amount of memory avaiulable for the heap. So you will have to decrease your heap size. I can't recall the maximum heap we have ever gotten out of Windows 2003, though 1.4 GB comes to mind.

          Also, setting the /3GB boot option will not help because even with that option there is not enough contiguous memory available for the size of heap you want.

          However, you could use a JVM that doesn't need contiguous memory space to allocate the heap, and such a JVM might be able to allocate a big heap even without the /3GB heap option. The Unisys JVM (available at http://ecommunity.unisys.com/ecommunity/templates/longdescription.aspx?DocID=62563, requires free registration) does not require contiguous memory. If I recall correctly, we have gotten heaps of about 1.7GB without the /3GB boot option and around 2.7GB with the /3GB boot option. Of course, your mileage may vary.