Updated on 2024-04-03 GMT+08:00

Managing Anomaly Snapshots

Scenarios

This function intelligently detects instance anomalies and records information about session, lock, and transaction snapshots to facilitate subsequent fault locating.

Constraints

  • To use this function, contact customer service to apply for required permissions.
  • Enabling anomaly collection will cause about 5% of instance performance loss.
  • For an HA read replica with anomaly snapshots enabled, if the primary read replica node fails and workloads are automatically switched over to the standby read replica node, anomaly snapshots will not be enabled for the new primary read replica node.
  • Each anomaly snapshot can be retained for a maximum of seven days. A maximum of 10 anomaly snapshots can be retained for each node at the same time.

Enabling Anomaly Collection

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  4. On the Instances page, click the DB instance name.
  5. In the navigation pane, choose DBA Assistant > Historical Diagnosis.
  6. Click the Anomaly Snapshots tab.
  7. On the displayed page, toggle on the Anomaly Collection switch.

    Figure 1 Anomaly Snapshots

Viewing Anomaly Snapshots

  1. Click the Anomaly Snapshots tab.
  2. On the displayed page, view session snapshots, metadata lock snapshots, InnoDB lock snapshots, and transaction snapshots of the DB instance.

    • To view anomaly causes, click Diagnosis Details in the Operation column.
    • To view details about slow SQL statements, click Slow SQL in the Operation column. For details, see Viewing Slow Query Logs.