Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Default situation

By default Tomcat starts up with a memory allocation of just 512 megabytes in many situations. This is not enough. Other JVM configuration options may be important as well.

What are your Java settings? The quickest way to check is using this the option “System Information” in the xDM Application Builder:

...

Solution

Warning: setting optimal memory options for a Java Virtual Machine is complex. It will be different depending on your exact usage patters. So there There is no single answer which can be ideal for all environments.

First: determine how to set CATALINA_OPTS or JAVA_OPTS in your environment.

  • In VMs and AMIs provided by Semarchy on Azure and AWS Marketplace, this is done in the file /etc/default/tomcat8.

  • In “Semarchy xDM - Preconfigured with Apache Tomcat” JAVA_OPTS are set in the file setenv.sh or setenv.bat. Default value in xDM 5.21:
    CATALINA_OPTS="$CATALINA_OPTS -Xmx512m -server -XX:+UseG1GC -Dorg.apache.cxf.Logger=org.apache.cxf.common.logging.Slf4jLogger -Duser.language=en -Duser.country=US -Djava.awt.headless=true"

  • In many Linux environments it is these options set in the file /etc/tomcat8/tomcat8.conf.

...