Updating heap size for tomcat
search cancel

Updating heap size for tomcat

book

Article ID: 333088

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

  • Tomcat service crashes due to lack of heapsize. OutOfMemory: java heap space error is noticed while accessing the MnR FrontEnd. 
  • Slowness observed while using MnR FE.

Environment

Watch4Net/MnR - 7.x

Resolution

In this article, heap size increment is shown for Tomcat service, however, same logic can be applied for other Watch4net module like the Backend or the Collector-Manager.
  • Memory allocation settings for APG Tomcat are located in unix-service.properties file. The default  path of this file is 
    <APG_BASE>/Web-Servers/Tomcat/Default/conf/unix-service.properties
  • The following lines (memory.init & memory.max) specify the initial and maximum amount of memory Tomcat can use as Heap:

         Example unix-service.properties file:

#====================================
# Initial Java Heap Size (in MBytes)
#====================================
memory.init=64
 
#====================================
# Maximum Java Heap Size (in MBytes)
#====================================
memory.max=2048
 
  • Modifying unix-service.properties file, needs service update for changes to take effect: 
    <APG_BASE>/bin/manage-modules.sh service update tomcat
  • After updating the service, restart the service as: 
    <APG_BASE>/bin/manage-modules.sh service start tomcat

Additional Information

In certain case, user does not have server access; heap size can be increased from MnR FrontEnd (Centralized Management).

To change the memory settings for any java service, open centralized management --> Physical Overview --> Modules --> Navigate to service for which heap need to be adjusted (Example: Tomcat)

To change the memory.max settings for Tomcat Service, click 'Configure service', see image for reference:

Upon clicking, new window 'Service settings' will open where heap can be changed and saved.