JVM memory has following regions: Fig: JVM memory regions a. Young Generation b. Old Generation c. Metaspace d. Others region When you encounter 'java.lang.OutOfMemoryError: Metaspace' it indicates that the Metaspace region in the JVM memory is getting saturated. Metaspace is the region where metadata details that are required to execute your application are stored. In... Continue Reading →
In which region intern strings are stored?
intern() is an interesting function in java.lang.String object. intern() function eliminates duplicate string objects from the application and has potential to reduce overall memory consumption of your application. To understand how string intern() function works you may refer to this interesting blog. Intern strings are stored in a string pool in the JVM memory. JVM... Continue Reading →
Inspect the contents of the Java Metaspace region
JVM Memory has following regions: a. Young Generation b. Old Generation c. Metaspace d. Others region Fig: JVM memory regions To see what objects are stored in what region, you may refer to this video clip. Sometimes your application might run into 'java.lang.OutOfMemoryError: Metaspace' as discussed in this post. In such circumstances you might want... Continue Reading →
Troubleshooting Microservice’s OutOfMemoryError: Metaspace
Recently we confronted an interesting 'java.lang.OutOfMemoryError: Metaspace' problem in a Microservice application. This Microservice application will run smoothly for initial few hours, later it will start to throw java.lang.OutOfMemoryError: Metaspace. In this post let me share the steps we pursued to troubleshoot this problem. Different types of OutOfMemoryError JVM memory has following regions: a. Young... Continue Reading →