Generally, the ARMS agent occupies about 100 GB memory. Advanced features such as Continuous profiling even incur additional memory overheads. If the "OutOfMemoryError" error occurs after your application is connected to Application Monitoring, apply for JVM memory based on your needs.
If the
OutOfMemoryError: Java heap space
error occurs, increase the heap memory space. The following sample configurations indicate that the initial heap memory (Xms) is 1GB and the maximum heap memory (Xmx) is 2 GB.NoteYou can adjust the memory based on your needs. In other environments such as Tomcat, add this parameter to JAVA_OPTS in the configuration file.
-Xms1024M -Xmx2048M
You can also use the
-XX:InitialHeapSize
andXX:MaxHeapSize
parameters to set the heap memory as a percentage. For more information, see JDK documentation.If the
OutOfMemoryError: PermGen space
error occurs, increase the permanent generation space.-XX:PermSize=256M -XX:MaxPermSize=512M
If a
OutOfMemoryError: metaspace
error occurs, increase the metadata space.-XX:MetaspaceSize=256M -XX:MaxMetaspaceSize=512M