Skip to main content
Solved

IFS Cloud java.lang.OutOfMemoryError: Java heap space

  • February 16, 2023
  • 2 replies
  • 711 views

Darshana Herath
Hero (Former Employee)
Forum|alt.badge.img+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

Best answer by Charith Epitawatta

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!

View original
Did this topic help you find an answer to your question?

Charith Epitawatta
Ultimate Hero (Employee)
Forum|alt.badge.img+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!


Forum|alt.badge.img+10

Hello ​@Charith Epitawatta 

We have increased the memory allocation on the container level 

“kubectl edit deployment ...”

but after every delivery the value is reset, any idea how to make this modification permenante please? 

 

Thank you in advance

Regards


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings