After you create an application in an Elastic Compute Service (ECS) cluster, you can set related parameters for this application in the Application Settings section of the Basic Information tab. These parameters include Java Virtual Machine (JVM) parameters, Tomcat parameters, the application name, and mount scripts.

Go to the application settings page

You can set JVM parameters, Tomcat parameters, and mount scripts for an application or its instance groups. Settings for an instance group precede settings for the application. If an instance group does not contain the corresponding settings, the settings of the application are used for the instance group.

  1. Log on to the EDAS console.
  2. In the left-side navigation pane, click Applications. In the top navigation bar, select a region. In the upper part of the page, select a namespace. On the Applications page, click the name of the desired application.
  3. Go to the application or instance group settings page.
    • Application:

      In the Application Settings section of the Basic Information tab, click Basic Information, Mount Script, Edit next to Application Settings, or Edit next to JVM Parameters.

    • Instance group:
      1. Click the Instance Information tab. On the tab that appears, click Group Settings next to the group whose settings you want to configure.
      2. From the Group Settings drop-down list, select JVM, Tomcat, or Mount Script.

Set JVM parameters

JVM parameters are used to set container parameters when you start an application. Appropriate settings of these parameters help you reduce the overhead of garbage collection (GC), decrease server response time (RT), and improve overall throughput. If you do not set container parameters, default JVM parameters are used.

  1. In the Application Settings section of the Basic Information tab, click Edit next to JVM Parameters.
  2. Click to expand Memory Configuration, Applications, GC Policy, and Tool and set related parameters.
    Note If the preceding parameter types and specific parameters cannot meet your requirements, click Custom and set custom parameters in the field next to Custom Parameters.
  3. Click Configure JVM Parameters to complete the configuration.
  4. Manually restart the application for the JVM parameter settings to take effect.

Set Tomcat parameters

You can set the port number, application access path, and maximum number of threads for the Tomcat container.

  1. From the Group Settings drop-down list, select Tomcat.
  2. In the Application Settings section, click Edit next to Application Settings and set Tomcat parameters.
    • Application Port: Port numbers range from 1024 to 65535. Root permissions are required to configure port numbers less than 1024. However, an container has only the Admin permissions. Therefore, set the port number to 1024 or higher. If you do not specify this parameter, 8080 is used by default.
    • Tomcat Context: Select the access path of the application.
      • If you select Package Name, you do not need to set the Custom Path parameter. The access path of the application is the name of the WAR package.
      • If you select Root Directory, you do not need to set the Custom Path parameter. The access path of the application is /.
      • If you select Custom, you must enter a custom path in the Custom Path field. If you do not set this parameter, the default access path of the application is the name of the WAR package that is used to deploy the application.
    • Maximum Threads: Set the maximum number of connections in the connection pool, which corresponds to the maxThreads parameter. The default value is 400. This parameter greatly affects the application performance. We recommend that you set this parameter under professional guidance.
    • Tomcat Encoding: Select an encoding format for Tomcat. Valid values include UTF-8, ISO-8859-1, GBK, and GB2312. The default value is ISO-8859-1.
  3. Click Configure Tomcat to complete the configuration.

Change the application name

In the Application Settings section, click Basic Information. In the Application Settings dialog box, set the Application Name and Application Description parameters, and then click Modify.

Set status alerts

For applications in an ECS cluster that runs in EDAS Container, you can set Health Check Failure Alert, OOM Kill Alert, and Analysis of Abnormal Exit in the Application Settings section.

  • Health Check Failure Alert

    After you turn on Health Check URL and enable Health Check Failure Alert, EDAS regularly checks whether the HTTP status code of the URL is normal. This means whether the HTTP status code is in the form of 2XX or 3XX. If the status code is abnormal, EDAS sends an alert.

  • OOM Kill Alert

    After you enable OOM Kill Alert, EDAS monitors the memory usage of the host or container of the application. If EDAS finds that the memory usage is higher than 80% for a period of time and the application is at risk of being terminated by the system due to out-of-memory (OOM), EDAS sends an alert. After the system terminates the application due to OOM, EDAS sends an alert.

  • Analysis of Abnormal Exit

    After you enable Analysis of Abnormal Exit, EDAS monitors the liveness of the application. If the application unexpectedly exits due to system or human reasons, EDAS sends an alert.