Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Resolving OutOfMemoryError: Java Heap Space or GC Overhead

Description:

When running a Parasoft Test based product, you may see the error:

"java.lang.OutOfMemoryError: Java heap space".

or

"An internal error occurred during: "Building workspace".
GC overhead limit exceeded"

Cause:
This error occurs when Java runs out of memory.

Resolution:
To resolve this issue, you have two options:

  1. Reduce the amount of memory that the software is using. This is the recommended approach, since it usually involves applying Best Practices.
  2. Increase the amount of memory available to the software, as described below.

Allocating More Memory to the JVM
In some cases, the default amount of memory allocated to the JVM in which SOAtest / LoadTest / Virtualize runs may need to be increased when dealing with large test suites or complex scenarios.

Parasoft Test products

32-bit versions use 896MB by default.
64-bit versions use 1792MB by default - 896MB if using SOAtest <9.4

To increase the maximum heap size, pass a -J-Xmx argument to the executable.

For example, "cpptest -J-Xmx1400m" would start C/C++test with the maximum heap size set to 1400MB.

Tips

  • Other JVM arguments can be configured in similar way. Each JVM argument must be prefixed with "-J" when passed to the executable.
  • Multiple JVM arguments can be passed together with each argument prefixed with with "-J". For example, "soatest -J-Xmx1400m -J-Xms1024m" sets the max heap size to 1400MB and the starting heap size to 1024MB.

Detail about JVM arguments can be found here: