When we launch applications, we specify the initial memory size and maximum memory size. For the applications that run on JVM (Java Virtual Machine), initial and maximum memory size is specified through ‘-Xms’ and ‘-Xmx’ arguments. If Java applications are running on containers, it's specified through ‘-XX: InitialRAMPercentage’ and ‘-XX: MaxRAMPercentage’ arguments. Most enterprises set... Continue Reading →
Let’s crash the applications! – Confoo 2022
ConFoo Montreal is a multi-technology conference for developers. This year , they have conducted the program to exchange knowledge and ideas from speakers all over the world. Our Architect Ram Lakshmanan was invited to give a talk on the topic: "Let's crash the applications!" In this session, following topics have been discussed: code snippets that... Continue Reading →
Let’s crash the applications! – W-JAX 2021
JAX – Online conference is the meeting place for all Java and software architecture enthusiasts! This year also, they have conducted an online conference to exchange knowledge and ideas from speakers all over the world. They have invited our architect to present the topic “Let's crash the applications!”. In this session, sample code snippets that... Continue Reading →
OutOfMemoryError: Kill process or sacrifice child – causes & solutions
There are different flavors of OutOfMemoryError. One of the flavours of OutOfMemoryError is 'Kill Process or sacrifice child'. This post discusses what triggers this 'Kill Process or sacrifice child' OutOfMemoryError and potential solutions to diagnose this problem. What triggers Out Of memory: Kill Process or sacrifice child? When processes in the host tend to consume... Continue Reading →
Chaos Engineering – Thread Leak
In the series of chaos engineering articles, we have been learning to simulate various performance problems. In this post, let's discuss how to simulate thread leaks. 'java.lang.OutOfMemoryError: unable to create new native thread' will be thrown when more threads are created than the memory capacity of the device. When this error is thrown, it will... Continue Reading →
Troubleshooting OutOfMemoryError – Heap dump, Eclipse MAT
Learn how to troubleshoot OutOfMemoryError using the Eclipse MAT tool. You will learn best practices, cool tips & tricks to debug memory problems effectively. Watch this video to know more! Video https://youtu.be/SuguH8YBl5g
Memory Leak in Java executor
I was surprised to witness the Java Executor behavior - which caused "java.lang.OutOfMemoryError: unable to create new native thread" in our application. I would like to share my surprise (i.e. problem) and resolution to it. In order to explain the problem better, I created the following example: import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; public class ThreadLeaker... Continue Reading →
Chaos Engineering – Simulating OutOfMemoryError
In the series of chaos engineering articles, we have been learning to simulate various performance problems. In this post, let's discuss how to simulate 'java.lang.OutOfMemoryError: Java Heap space' problem. This 'java.lang.OutOfMemoryError: Java Heap space' will be thrown by the application when the application generates more objects than the allocated heap size. Java OutOfMemoryError Program Here... Continue Reading →
Buggy App – Simulate performance problems
Buggy App is a simple java application that simulates different performance problems like Memory Leak, OutOfMemoryError, CPU spike, thread leak, StackOverflowError, deadlock, unresponsiveness, ... Using this application, you can simulate various performance problems in your environment. Here are a few use cases where Buggy App can be used: a. You can configure and launch Buggy... Continue Reading →