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 (Windows)

  1. Locate tomcat_directory/bin/tomcat8w.exe, a GUI application for monitoring and configuring Tomcat services.
  2. Rename tomcat8w.exe to the value of the service name for TAC or MDM, which you can find in the Service name field below. Also include this name at the end of the Windows service Path to executable field after //RS// (to access Windows Services, at a command prompt, enter services.msc). For example:

     

    Original name: tomcat8w.exe

    New name: talend-tac-6.4.1.exe

     

    Note: By default, in Windows Explorer, well-known file name extensions will not appear, so the tomcat8w.exe file may appear as just tomcat8w. In this case, you want to change the name to just talend-tac-6.4.1—the .exe extension remains hidden by Explorer.

    2017-08-03 07_46_55-Screenshots.png

     

  3. When you have renamed tomcat8w.exe 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 Xmx JVM memory settings as necessary. The value below is 2GB; according to the recommended hardware requirements, you generally want it to be at 8GB or higher.

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

     

Solution or Workaround (Linux/Unix)

  1. Create the TAC/apache-tomcat/bin/setenv.sh file and add the modified line below. The catalina.sh script reads the setenv.sh file if it exists. This file should be owned by the same user as catalina.sh. If it doesn't exist, you may need to create it.

     

    Original:

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

     

    Modified:

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

    Note: If you ran TAC manually, then stop (./stop_tac.sh) and restart (./start_tac.sh) it.

    Or:

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

This increases the maximum memory available to the TAC process from 2GB to 8GB, the recommended amount.

Verification

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

 

The file you're looking for is catalina.out or catalina.today's date.log (for example, catalina.2018-07-02.log). It looks something like the line in red below.

 

You can open the catalina log file in any text editor, or, if you have UnxUtils or some other terminal emulator, such as Git BASH installed (and it is in your PATH), you can use the tail command (for example, 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

 

Version history
Revision #:
22 of 22
Last update:
‎10-02-2018 10:13 AM
Updated by:
 
Comments
Employee

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.