All Products
Search
Document Center

Application Real-Time Monitoring Service:What do I do if the "OutOfMemoryError" error is reported when I start an application after the ARMS agent is installed?

Last Updated:Apr 15, 2024

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.

    Note

    You 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 and XX: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