There is insufficient memory for the Java Runtime Environment to continue

Hi Team

I am trying to run katalon using console mode commands. I am using powershell remote to execute the commands and getting below error.

!ENTRY org.eclipse.core.resources 2 10035 2018-04-04 16:27:29.035
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
Starting Groovy-Eclipse compiler resolver. Specified compiler level: unspecified
131 2.4.7.xx-201611170128-e46 = ACTIVE

# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 1538896 bytes for Chunk::new
# An error report file with more information is saved as:
# C:\Users\xxxxx\hs_err_pid8644.log

# Compiler replay data is saved as:
--------------------------------------------

in the log file it says below solutions:
# Possible solutions:

Reduce memory load on the system

Increase physical memory or swap space

Check if swap backing store is full

Use 64 bit Java on a 64 bit OS

Decrease Java heap size (-Xmx/-Xms)

Decrease number of Java threads

Decrease Java thread stack sizes (-Xss)

Set larger code cache with -XX:ReservedCodeCacheSize=

How can I update -XX:ReservedCodeCacheSize= value. I tired to update the file for jvm.cfg which is in (\Katalon_Studio_Windows_64-5.3.1\jre\lib\amd64\jvm.cfg) , But after that Katalon studio is complaining about the newly added item.

I aslo noticed that Kalaton is using eclipsec.exe , Can we create a config file for that or How can I fix this out of memory issue:

Please advise.

Thanks
Anju

Which Katalon Studio version (32/64 bits) you are using?

By the way, you can also open **katalon.**ini file in your Katalon Studio folder and increase -Xmx value to be higher

Screen Shot 2018-04-04 at 15.50.50.png

Issue:
Cannot run Test Cases/Test Suites on PC “B” that were created in Katalon Studio v5.4.1 PC “A”…

Console Error:

Error occurred during initialization of VM

Could not reserve enough space for 1013760KB object heap

*******************************
PC “B” Java Version

Microsoft Windows [Version 6.1.7601]

Copyright © 2009 Microsoft Corporation. All rights reserved.

C:\Users\David>java -version

Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook

Picked up _JAVA_OPTIONS: -Xbootclasspath/a:"C:\Program Files (x86)\HP\Unified Functional Testing\bin\java_shared\classes

\jasmine.jar"

java version “1.8.0_144”

Java™ SE Runtime Environment (build 1.8.0_144-b01)

Java HotSpot™ 64-Bit Server VM (build 25.144-b01, mixed mode)

***************************************
PC “B” Katalon.ini File

-startup

plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar

–launcher.library

plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.401.v20161122-1740

-data

config

-vmargs

-Xms256m

-Xmx1024m

Unable to resolve the -Xmx issue using Katalon Studio 32 Bit 5.4.1 Version on PC “B”…

Had to install Katalon Studio 64 Bit 5.4.1 Version on PC “B”…

PC “A” using Katalon Studio 32 Bit 5.4.1 Version started demonstrating the -Xmx issue…

Had to install Katalon Studio 64 Bit 5.4.1 Version on PC “A” as well…

To whom it may concern,

Katalon Studio version 7.0.0 is enhanced to reduce memory consumption by adding some JVM options.

Please first check out the release note and click here to download if you want to try version 7.0.0 (beta) in advance.

Cheers

Jass

Hi,

Could you please let us know if same optimization is done for KRE.

The message above means that you’re running so many programs on your PC that there is no memory left to run one more. This isn’t a Java problem and no Java option is going to change this.

Use the Task Manager of Windows to see how much of your 4GB RAM is actually free. My guess is that somewhere, you have a program that eats all the memory. Find it and kill it.

EDIT You need to understand that there are two types of “out of memory” errors.

The first one is the OutOfMemoryException which you get when Java code is running and the Java heap is not large enough. This means Java code asks the Java runtime for memory. You can fix those with -Xmx…

The other error is when the Java runtime runs out of memory. This isn’t related to the Java heap at all. This is an error when Java asks the OS for more memory and the OS says: “Sorry, I don’t have any.”

To fix the latter, close applications or reboot (to clean up memory fragmentation).

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.