Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Current »

By default, tomcat comes with the memory setting of 256MB, whereas the recommended memory for OpenSpecimen is 2GB. This document describes the steps to increase the memory for Java process in tomcat. 

If OpenSpeicmen installed using the installer, it will set above memory settings by default. Set below settings if tomcat is not installed using OpenSpecimen installer or not using recommended settings.

How to check what is max memory set for java process?

  1. Open $TOMCAT_HOME/logs/catalina.out file.
  2. Search for the string "-Xmx" 
    It will look like -Xmx2048m. If memory is less than 2048 then it means max memory is less than 2 GB.

How to set max memory for Java process?

Windows:

  1. Delete the existing tomcat service with command: SC DEL <name of the tomcat service>. The service name can be checked in the services.
  2. Open $TOMCAT_HOME/bin/service.bat in any text editor.
  3. Search for the string "--JvmMx"
  4. Change the max memory to 2 GB (recommended)
    > Before --JvmMx 256
    >After --JvmMx 2048
  5. Save the file.
  6. Open command prompt
  7. Go to $TOMCAT_HOME/bin
  8. Run the command service.bat install 
  9. Start the newly installed Apache Tomcat service.

Linux:

  1. Create new file setenv.sh inside $TOMCAT_HOME/bin/ directory.
  2. Add below line in newly created setenv.sh file 
    export JAVA_OPTS="-Dfile.encoding=UTF-8 -Xms128m -Xmx2048m -XX:PermSize=64m -XX:MaxPermSize=512m"
  3. Restart the tomcat service using command - su service <service_name> restart.


  • No labels