-->

Friday, May 22, 2020

[Solved] OutofMemory Exception on Java Application running on Docker Containers

We recently came across a issue where the java application was frequently facing the OutofMemory Exception.

Usually the Java based applications use the parameters -XX:MaxRAMPercentage / -XX:MinRAMPercentage are used to restrict the heap utilization within certain % limits from 1 to 100 which holds good when you running these applications on the virtual instances like EC2.

But when you running them on containers than VM allocates a larger fraction of memory to the Java Heap. To turn off this behaviour, set the -XX:-UseContainerSupport

When -XX:MaxRAMPercentage / -XX:InitialRAMPercentage are used with -XX:+UseContainerSupport, the corresponding heap setting is determined based on the memory limit of the container.

Saturday, May 16, 2020

Installing Terraform on Centos Linux

1. Download the terraform for the linux from the site using wget
https://www.terraform.io/downloads.html
wget https://releases.hashicorp.com/terraform/0.12.25/terraform_0.12.25_linux_amd64.zip

2.Install the unzip if not already installed as
yum install unzip

3. Unzip the zip file to the /usr/local/bin as 
unzip terraform_0.12.25_linux_amd64.zip -d /usr/local/bin/

4. Verify the terraform has been successfully installed as
[root@localhost ~]# terraform -v
Terraform v0.12.25