#208 Heapsize for 32bit VM on 64bit OS limit (maxmemory.percent)


In relation with #2053167 which is fixed with 3.3.1 for a 32bit VM used on a 32bit Operating System:

When using a 32bit VM on a 64bit Operating System the Heapsize is set too large.
This combination makes sense for example if you want to use many java processes on a large system as using a 64bit VM would unnecessary increase the memory usage with its 64bit integers and pointers.

The problem is reproducable with using


on a Solaris x86 64bit system with 16GByte RAM. The result ist:

STATUS | wrapper | 2008/09/08 17:33:05 |
INFO | wrapper | 2008/09/08 17:33:05 | Command[0] : /usr/jdk/instances/jdk1.6.0/bin/java
INFO | wrapper | 2008/09/08 17:33:05 | Command[1] : -Djava.awt.headless=true
INFO | wrapper | 2008/09/08 17:33:05 | Command[12] : -Xms12213m
INFO | wrapper | 2008/09/08 17:33:05 | Command[13] : -Xmx12213m
INFO | wrapper | 2008/09/08 17:33:05 | Command[14] : -Djava.library.path=shared/lib:server/lib
STATUS | wrapper | 2008/09/08 17:33:05 | Launching a JVM...
ERROR | wrapper | 2008/09/08 17:33:06 | JVM exited while loading the application.
INFO | jvm 1 | 2008/09/08 17:33:06 | Invalid initial heap size: -Xms12213m
INFO | jvm 1 | 2008/09/08 17:33:06 | The specified size exceeds the maximum representable size.
INFO | jvm 1 | 2008/09/08 17:33:06 | Could not create the Java virtual machine.
FATAL | wrapper | 2008/09/08 17:33:06 | There were 1 failed launches in a row, each lasting less than 35 seconds. Giving up.
FATAL | wrapper | 2008/09/08 17:33:06 | There may be a configuration problem: please check the logs.
STATUS | wrapper | 2008/09/08 17:33:06 | <-- Wrapper Stopped

My suggestion for a simple solutation as you can never estimate the usable maximum heap for 32bit VMs:

Just launch "java -XmxTESTSIZE -version" within a loop from the wrapper testing for a value of TESTSIZE which runs successfully.


  • Leif Mortenson

    Leif Mortenson - 2008-09-08
    • labels: --> Configuration
    • milestone: --> v3.3.1
    • assigned_to: nobody --> mortenson
  • Leif Mortenson

    Leif Mortenson - 2008-09-08

    Are you running this with a 32 or 64-bit version of the Wrapper? 32-bit versions of the Wrapper should be capping the physical memory used to calculate the percentage at 2048MB. I would expect to see the results you are seeing if you attempt to launch a 32-bit JVM using a 64-bit version of the Wrapper.

    Even if you set the memory size to something low enough to do this, the 32-bit JVM is going to fail when it attempts to load the 64-bit libwrapper.so JNI library.


  • Holger Isenberg

    Holger Isenberg - 2008-09-09

    It's the wrapper-solaris-x86-64 binary and both libraries are available, so the Java-VM selects the correct 32bit one.

    Of course, if you only install the 32bit version, there is no problem, but we like to have a universal installation to switch between 32 and 64bit version for tests and when using multiple java processes on the same machine. My suggestion with the loop and trying to find out the usable maximum heapsize would be independent from the wordsize of the wrapper binary.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks