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 the initial memory size to a lower value than the maximum memory size. As opposed to this commonly accepted practice, setting the initial memory size the same as the maximum memory size has certain ‘cool’ advantages. Let’s discuss them in this post.
Continue reading “Benefits of setting initial and maximum memory size to the same value”Memory leak due to improper exception handling
In this post let’s discuss an interesting memory problem we confronted in the production environment and how we went about solving it. This application would take traffic for a few hours after that it would become unresponsive. It wasn’t clear what was causing the unresponsiveness in the application.
Continue reading “Memory leak due to improper exception handling”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.
Continue reading “Let’s crash the applications! – W-JAX 2021”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.
Continue reading “OutOfMemoryError: Kill process or sacrifice child – causes & solutions”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!
Continue reading “Troubleshooting OutOfMemoryError – Heap dump, Eclipse MAT”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.
Continue reading “Chaos Engineering – Simulating OutOfMemoryError”JAX Online 2020 – Why (& How to) write memory efficient code?
JAX – Online Edition 2020 is the conference for JAVA, architecture and software innovations. This conference had 4 major workshops and nearly 20 sessions presented by many speakers from all over the world! All were performed live, carried out with the video platform and designed interactively for the developers.
Continue reading “JAX Online 2020 – Why (& How to) write memory efficient code?”7 JVM arguments of Highly Effective Applications
At the time (March 2020) of writing this article there are 600+ arguments that you can pass to JVM just around Garbage collection and memory. If you include other aspects, total JVM arguments count will easily cross 1000+. 😊. It’s way too many arguments for anyone to digest and comprehend. In this article, we are highlighting seven important JVM arguments that you may find it useful.
Continue reading “7 JVM arguments of Highly Effective Applications”How is HeapHero different?
There are excellent Heap dump analysis tools like Eclipse MAT, Jprofiler, … These tools are handy when you want to debug/troubleshoot OutOfMemoryError. However, we HeapHero has following unique capabilities which aren’t available in those tools:
Continue reading “How is HeapHero different?”TCP: out of memory — consider tuning tcp_mem
Recently we experienced an interesting production problem. This application was running on multiple AWS EC2 instances behind Elastic Load Balancer. The application was running on GNU/Linux OS, Java 8, Tomcat 8 application server. All of sudden one of the application instances became unresponsive. All other application instances were handling the traffic properly. Whenever the HTTP request was sent to this application instance from the browser, we were getting following response to be printed on the browser.
Continue reading “TCP: out of memory — consider tuning tcp_mem”