All Products
Search
Document Center

Serverless App Engine:Debug an application instance

Last Updated:Sep 03, 2024

This topic describes how to use the one-click debugging feature in the SAE console to debug an application instance.

Prerequisites

An application is deployed. For more information, see Deploy a Java application to SAE 1.0.

Background information

When you deploy an application instance, the instance may fail to start because of an exception in the application or in other configurations. For example, the instance remains in the CrashLoopBackOff state. In this case, you can use the one-click debugging feature and webshell feature of Serverless App Engine (SAE) to access the application container for debugging and troubleshooting. For more information, see Use the webshell feature to check the health status of applications.

Procedure

  1. Log on to the SAE console.

  2. In the left-side navigation pane, click Applications. In the top navigation bar, select a region. Then, click the name of an application.

  3. On the Basic Information page, click the Instance Deployment Information tab. In the Default Group section, find the application instance whose Status is CrashLoopBackOff, move the pointer over CrashLoopBackOff, and click One-click Debugging in the tool tip.

    image

  4. In the One-click Debugging dialog box, perform the following steps:

    1. In the Modify Application Configuration Parameter step, select I understand the system modification behavior and I accept further debugging. and click Next.

      After the instance is restarted, you can proceed to the debugging step. sc_debug_an_instance_in_webshell

    2. In the Debug Instance step, click Debug Instance to access the application container by using the webshell.

    3. Debug the application instance. For example, you can manually start the application.

      When an application instance is being debugged, the value of the Status parameter is No Service Traffic Received. This allows you to distinguish the application instance from other instances that are in the Running state.

  5. After the debugging is complete, select a method to delete the application instance based on the status of the application instance.

    • A change in the application instance is ongoing:

      In the upper-right corner of the Basic Information page, click Back to Earlier Version and configure a release policy to roll back the application instance to an earlier functioning version. After the change release is successful, the application instance that you debugged is automatically deleted. For more information, see Roll back an application to a previous version.

    • The application instance is in the Running state with no ongoing changes:

      Find the instance that you debugged and click Delete in the Actions column. In the Delete Instance dialog box, click OK.

    Note

    When you use the one-click debugging feature to debug an application instance, the instance does not receive business traffic. After the debugging is complete, you must immediately delete the instance. Otherwise, you may be charged for idle resources.