Java is out of memory : Java heap space
search cancel

Java is out of memory : Java heap space

book

Article ID: 367649

calendar_today

Updated On:

Products

Brightside

Issue/Introduction

Downloading 4000 PDS members from ZOS to a GitHub stops with message out of memory.

The JVM has stopped with a message out of memory. ZOWE is unavailable but the STC continue to run.

Environment

Zowe 2.14 and higher

Cause



Resolution

With Zowe v2.14, there's a feature available to increase the heap memory available for the Java components.

To increase it, the following change can be applied to the zowe.yaml file:

components:

# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

  gateway:

    heap:

      init: 1024

      max: 1024

The unit for the initial and max size of the heap is megabytes and 1024 is given as a reference. The defaults are 32 MB for the initial and 512 MB for the max size.

For production environments, it's recommended that Java heap sizes are fixed with the same initial and max sizes. 

Regarding the out-of-memory error itself, reaching the Java heap limit will depend on the load applied to the system. 

Additional Information