Cannot reserve enough space for Object Heap

Hi All,

With great difficulty, I managed to install BOE XI 3.1 SP3 on 64 bit Solaris Sparc machine. Reason being, the machine I was installing on had “256” cores. When I ran the installer, it gave me a core dump error and later after a lot of research/reading, I realized the 256 cores were causing the problem and the memory allocator in the installer could not allocate memory for the cores. The work around was to disable the memory allocator “libhoard.so” during installation and proceed with the install. I believe memory management is now taken care by Solaris. Now I can run basic reports that I create off of a sample universe.

My problem now is when i try to run reports which retrieve a good chunk of data, my tomcat crashes “Exception in thread “CompilerThread0” java.lang.OutOfMemoryError: requested 32756 bytes for ChunkPool::allocate. Out of swap space?”

Tomcat Settings:
$JAVA_OPTS -Xmx2048m -Xms256m XX:MaxPermSize=256m

When I try to increase the memory by editing JAVA_OPTS in the env.sh file under /bobje/setup to 2GB
$JAVA_OPTS -Xmx2048m -Xms512m -XX:MaxPermSize=256m, tomcat refuses to start and the log files read
“Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine”

I know for sure that the “monster” machine has enough memory available.

Can anyone please throw some light on how to tackle this issue. Would really appreciate help! :hb:


ragpan29 (BOB member since 2010-05-14)

Hmm…

Try:

-Xmx1024m
-XX:PermSize=512m
-XX:MaxPermSize=512m


Atul Chowdhury (BOB member since 2003-07-07)

Hi Atul,

Thanks for your input. Where do you want me to set these values?? I tried setting them in the env.sh file. It didnt work.

Where else can I change the tomcat settings?

Thanks


ragpan29 (BOB member since 2010-05-14)

Is it possible to use JDK 1.6 for your XI3.1 installation ? The JVM does a better job allocating what it thinks it needs based on availability therefore handling something like Xms on its own.

And I know this is unix and you “never” reboot a *nix box, but for fun, is it possible to do so, just to see?


Atul Chowdhury (BOB member since 2003-07-07)

Hi Atul,

I can restart the system if at all reqd. But I would like to know the exact way to increase tomcat JVM settings.
Currently, I am making changes to the env.sh file and restarting “Tomcat”.Would doing this alone suffice,cause it gives me an error saying cannot reserve space for object heap. Can you please tell me the exact procedure to make the changes to the tomcat JVM.

Thanks


ragpan29 (BOB member since 2010-05-14)

I’d have to boot up my openSUSE installation but barring that, I would have a look at this:

And confirm your settings from there.


Atul Chowdhury (BOB member since 2003-07-07)

env.sh is the proper place to increase heap for the BOE supplied Tomcat instance. I bumped up my heap to 1.5GB on AIX and Tomcat reflects the increased heap size.

Even though you are running on 64-bit Solaris, BOE uses a 32-bit Java process. 32-bit programs can only use about 2GB of memory (more or less). You are requesting the JVM to reserve 2GB (your Xmx parameter) + 256MB (permanent generation) + (other memory needed for the JVM to function) which is more than the 2GB 32-bit limit. Furthermore, the JVM tries to claim all its memory in 1 contiguous block and it is quite possible that no such block exists. I am not familiar with Solaris to comment on its memory allocation model.


BoB LoblaW :us: (BOB member since 2007-10-23)

Thank you Atul and BobLaw for your inputs. Really appreciate your help!

Good to know that env.sh is the place to change the heap size for tomcat.

The other part of the environment which I forgot to mention is the 3 solaris environments (DEV,TEST,PROD) that I have for installation are solaris zones. The global resources available to each of the environments is 256 cores and 99GB memory. The DEV and TEST environments are not capped with the number of cores they can use for processing, but the production even though it can see 256 cores is capped to use only 8/10 cores based on the license purchased. The memory for each environment is assigned from the global pool (99GB). Tomcat crashes time and again giving out of memory error. I would be really surprised if tomcat cannot find 1 contiguous block of memory from the global pool.

Are there any known issues with tomcat 5.5 or jdk 1.5 on Solaris 10 zones?

Now that you have the entire picture of the installation environment, do you guys suggest any kind of work around that I can try??

I have opened a tkt with SAP, but they are yet to get back to me.


ragpan29 (BOB member since 2010-05-14)

Hey - what steps did you take to disable the memory allocator “libhoard.so” ??


stephenPegasis (BOB member since 2011-04-06)

The memory allocator needs to be disabled before the installer starts the actual installation process. So, once you start the installer, the packages are first extracted.

  • Navigate to the /bobje/setup in and wait for the env.sh file to be extracted. This particular script file gets extracted when the installer is in the “Extracting Packages” phase around 68% done.
  • Create a backup of the env.sh script file.
  • Disable the memory allocator by commenting out the following lines in env.sh and saving the script file.
    LD_PRELOAD=“libhoard.so.1”
    export LD_PRELOAD
    You will need the write permission in order to make changes to the script file.
    If you fail to make the following changes, you will need to delete the installation files and start the installer all over again!

ragpan29 (BOB member since 2010-05-14)