Help with JVM heap error

From NWChem

Viewed 5758 times, With a total of 3 Posts
Jump to: navigation, search

Just Got Here
Threads 1
Posts 1

We are running ECCE 6.4 entirely on a single compute server --- and when the 3rd user runs ECCE they see the message below and ECCE fails to run.

     starting ECCE ... please wait
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

and the running java process is:

          /usr/bin/java -Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Dactivemq.classpath=/home/ecce_server/activemq/conf; -Dactivemq.home=/home/ecce_server/activemq -Dactivemq.base=/home/ecce_server/activemq -jar /home/ecce_server/activemq/bin/run.jar start

Users connect via ssh from Mac/PC and Linux workstations and display the GUI back to their local Xserver.

This seems to be a resource error; anyone know how to increase the memory to avoid this problem?


Edited On 1:05:24 PM PDT - Tue, May 21st 2013 by Jwallace

Gets Around
Threads 16
Posts 115
[Deleted -- not the correct answer]
Edited On 7:01:23 PM PDT - Thu, May 23rd 2013 by Ohlincha

Gets Around
Threads 2
Posts 82
Hi John,

I've never seen this before on any of our systems. The simplest fix though would be if the memory allocated with the "-Xmx" argument to the java command (for the java virtual machine that's created for the ActiveMQ messaging server) could be bumped up to resolve it. That argument is set in the activemq package startup script rather than from something directly in ECCE. But you should be able to edit it and restart the ECCE server and see if it makes a difference.

If you cd to the top-level ECCE server install directory, do a "cd activemq/bin". Then edit the "activemq" file and search for "-Xmx". You'll see it set to "512M". You could just double it to "1G" or go beyond that even to say "2G". Make sure you stop the ecce server though before trying to restart it. Also confirm it is running with the amount of memory you expect before starting the ECCE client GUI by doing another "ps" command for the java process. I'm not sure at all if this will help, but seems like the best thing to try.


Gets Around
Threads 2
Posts 82
Hi John,

Learned a few more things....

1. Add an "-Xms" argument right after the "-Xmx" one already in the activemq script. Make the size for this the same as the one for "-Xmx".

2. First try leaving it at the default 512M size so the arguments would be "-Xmx512M -Xms512M". If that doesn't work, bump them both up to 1G.

3. Also specify "-d64" as an argument. This allows bigger memory sizes by using a 64-bit data model.

4. Make sure you are pointing to a 64-bit java executable. Do a "which java" and then run "file" commands on that absolute file path. It may be symbolically linked multiple times so just keep following the links until you find the real executable and the file commands indicates what it is (either a 32-bit or 64-bit executable). You want to make sure it's not a 32-bit executable. I doubt this is it if you are running on a dedicated compute server, but it's worth checking just to make sure. Even with a 32-bit executable using the "-d64" flag should be done.

So with all of these you may end up with arguments like "-d64 -Xmx1G -Xms1G" in the activemq script. I'm assuming with all this that you have many gigabytes of available memory so the problem isn't that it can't allocate what is already allocated (512M).


Forum >> ECCE: Extensible Computational Chemistry Environment >> General ECCE Topics

Who's here now Members 0 Guests 1 Bots/Crawler 0

AWC's: 2.5.10 MediaWiki - Stand Alone Forum Extension
Forum theme style by: AWC