Solved

IFS Cloud java.lang.OutOfMemoryError: Java heap space

  • 16 February 2023
  • 1 reply
  • 349 views

Userlevel 6
Badge +14

Hi All,

 

How to address “java.lang.OutOfMemoryError: Java heap space” issues in 22R2.

 

The error is from “ ifsapp-reporting-ren”

 

What is the parameter/how to increase/decrease the heap size of a pod?

 

Best regards

icon

Best answer by Charith Epitawatta 16 February 2023, 15:50

View original

1 reply

Userlevel 7
Badge +31

Hi @Darshana Herath,

First I would recommend going through the logs to see if there is any memory leak. Otherwise, increasing resources to the container will only delay the inevitable. 

To answer your question regarding how to increase memory for workload resources, please check the scale and cpuRatio parameters under global section in the ifscloud-values.yaml file. 

  • global.scale - defines the scaling of CPU and memory compared to the production mode. For a production environment, 100 is the recommended value, while for a test environment, about 50 should be enough. But you can upscale if necessary even in test environments.
  • global.cpuRatio - sets the CPU request/limit ratio defined in Deployments. I.e if defined as 50, initial allocation will be 50% of the limit value. 

Refer to IFS Cloud documentation on this here:

https://docs.ifs.com/techdocs/22r2/070_remote_deploy/010_installing_fresh_system/200_installing_ifs_cloud/035_ifs_cloud_ifsinstaller/030_installation_parameters/#parameters_for_reportingren

 

Assuming this is a Remote deployment, you can manually edit the ifsapp-reporting-ren Deployment and update the limit values under the resources section of the Deployment manifest too, but this would be overridden when you run the mtinstaller. However it should be okay to try that in a non-production environment to see if the issue gets resolved. 

  1. Run kubectl edit deployment ifsapp-reporting-ren -n <namespace> in a command line. This will open the manifest of the Deployment in a text editor. 
  2. Scroll down to the resources section of the ifsapp-reporting-ren container and update the memory value under limits.
  3. Save the file and close.

Please refer to the Resource Management for Pods and Containers section of the K8s documentation:

https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#requests-and-limits

Hope this helps!

Reply