How do I modify TAC or MDM memory settings when running as a service?

Talend Version          6.x
Key words TAC as a service, MDM as a service
Product Talend Data Integration
Component Talend Administration Center
Article Type Configuration
Problem Description Memory settings in the start scripts have been changed for Tomcat and MDM, but the changes don't take effect when they are run as services on Windows.
Problem root cause  

Solution or Workaround

  1. Locate tomcat_directory/bin/tomcat8w.exe, a GUI application for monitoring and configuring Tomcat services.
  2. Rename tomcat8w.exe to the service name for TAC or MDM, which can be found in the Windows service Path to executable field, after RS//:  (to access Windows Services, type services.msc at a command prompt).

    2017-08-03 07_46_55-Screenshots.png

     

  3. Once the tomcat8w.exe is renamed to the service name, run it for access to launch and service settings that can be set for the Tomcat service.

  4. In the Java Options field, change the Xms and Xmx JVM memory settings as necessary:

    2017-08-03 07_50_35-Talend Administration Center 6.4.1 Properties.png

     

Version history
Revision #:
10 of 10
Last update:
‎10-13-2017 02:21 PM
Updated by:
 
Comments
psmith

To modify this setting on Unix or Linux, create the file '[TAC]/apache-tomcat/bin/setenv.sh' and add the 'Modified' line below. (The catalina.sh script will read this setenv.sh file if it exists.)

 

This setenv.sh file should be owned by the same user as catalina.sh. You may have to create this file if it does not yet exist.

 

Original: 

export JAVA_OPTS="$JAVA_OPTS -Xmx2048m -Dfile.encoding=UTF-8"

Modified:

export JAVA_OPTS="$JAVA_OPTS -Xmx8192m -Dfile.encoding=UTF-8"

 

 

Then restart TAC. 

 

If you ran it manually, then stop (./stop_tac.sh) and re-start (./start_tac.sh) TAC.

 

Or:

 

sh <TomcatPath>/bin/shutdown.sh; sh <TomcatPath>/bin/startup.sh

 

 

This has increased the maximum amount of memory available to the TAC process from 2GB to 8GB (the recommended amount).

psmith

The 'Java' tab here can also be used to modify the path to the Java Virtual Machine's "jvm.dll" file.

 

This can be a fix for when the TAC service will not start -- often after a Java upgrade, when the pre-existing Java installation directory no longer exists -- so this path needs to be updated to point to the new "jvm.dll" in the new JRE_HOME directory. (e.g. "C:\Program Files\Java\jdk1.8.0_161" instead of "C:\Program Files\Java\jdk1.8.0_144")

 

You should also update your JRE_HOME and JAVA_HOME system environment variables to point to the new/updated Java installation.

psmith

To verify that your TAC server/service has started with the intended setting for '-Xmx<n>' (the intended maximum amount of memory), you can check the catalina log file from just after the time when you re/started the TAC server.

 

The file you are looking for will be called 'catalina.out' or catalina.[today's date].log (e.g. 'catalina.2018-07-02.log').

 

It will look something like below -- the line we care about is highlighted in red

 

You can open the catalina log file in any text editor, of if you have UnxUtils or some other terminal emulator like Git BASH installed (and it is in your PATH), you can use the 'tail' command (e.g. 'tail -f catalina.2018-07-02.log').

 

02-Jul-2018 10:01:14.103 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             C:\Program Files\Java\jdk1.8.0_144\jre
02-Jul-2018 10:01:14.104 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_144-b01
02-Jul-2018 10:01:14.104 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
02-Jul-2018 10:01:14.104 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\Talend\6.4.1\tac\apache-tomcat
02-Jul-2018 10:01:14.104 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         C:\Talend\6.4.1\tac\apache-tomcat
02-Jul-2018 10:01:14.104 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms1024m
02-Jul-2018 10:01:14.104 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx3210m
02-Jul-2018 10:01:14.104 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:PermSize=512m
02-Jul-2018 10:01:14.105 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Talend\6.4.1/tac/apache-tomcat
02-Jul-2018 10:01:14.105 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Talend\6.4.1/tac/apache-tomcat
02-Jul-2018 10:01:14.105 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=C:\Talend\6.4.1/tac/apache-tomcat\endorsed
02-Jul-2018 10:01:14.106 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Talend\6.4.1/tac/apache-tomcat\temp
02-Jul-2018 10:01:14.106 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager