Changing the memory setting in the OneClick catalina.sh file not taking affect

Document ID : KB000043274
Last Modified Date : 04/12/2018
Show Technical Document Details
Issue:

Updating the $SPECROOT/tomcat/bin/catalina.sh and setting the JAVA_OPTS -Xmx parameter to define the maximum memory the server can use not working as expected. We found that we MUST set the maximum memory size in OneClick's Administration - Web Server Memory page.

 

JAVA_OPTS="-DOneClick -server -Xmx4096M -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Djavax.net.ssl.trustStore=$SPECROOT/custom/keystore/cacerts -Dfile.encoding=UTF-8 -Dcom.sun.management.jmxremote -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true"

Cause:

Check for a tomcat-server-config.xml file located in the $SPECROOT/custom/common/config directory on the OneClick system. If this file is present and it contains a <memory> tag, then this will take precedence over the -Xmx entry in the $SPECROOT/tomcat/bin/catalina.sh file.

 

<?xml version="1.0" encoding="UTF-8"?>

<!--

-->

<!-- This file is a configuration file for tomcat server -->

<tomcat-server-config>

  <catalina>$$tomcat_root</catalina>

  <memory>1536</memory>

  <charset>UTF-8</charset>

</tomcat-server-config>

Resolution:

Use the OneClick Administration -> Web Server Memory page to set/change the Web Server memory:

381479.png


NOTE: Spectrum Support does not recommend modifying the catalina.sh file as these changes may be overwritten during a patch or upgrade install.