All Products
Search
Document Center

Database Autonomy Service:Other lock analysis

Last Updated:Mar 28, 2026

Manually querying system tables to trace lock waits—who is blocking whom, and why—requires deep familiarity with InnoDB internals and is time-consuming under production pressure. Database Autonomy Service (DAS) eliminates this by automatically analyzing metadata lock waits and transaction blocking in real time, generating visual relationship graphs so you can identify the blocking session and take action without writing a single query.

Note

The data in the figures is for demonstration purposes only. In practice, parameters such as thread IDs and SQL statements will differ based on your actual database environment.

Prerequisites

Before you begin, make sure you have:

  • A database instance running RDS for MySQL or PolarDB for MySQL

  • The instance connected to DAS with a connection status of Normal Access. For more information, see Connect a database instance to DAS

  • Alibaba Cloud Managed Services (formerly known as Economy Edition) for DAS enabled

Important

Alibaba Cloud Managed Services for DAS is available only in specific regions. For more information, see Supported databases and regions by edition. To enable it, see Manage Alibaba Cloud Managed Services (formerly known as Economy Edition) for DAS.

Lock types

DAS analyzes two types of locks:

Lock typeData sourcesLimitation
Metadata lock analysisinformation_schema.processlistNone
Transaction blocking analysisinformation_schema.processlist, information_schema.innodb_trx, plus a version-specific table (see below)Not supported for PolarDB for MySQL 5.6 instances

Transaction blocking analysis: version-specific tables

Engine versionTable
RDS for MySQL 5.6 and 5.7information_schema.innodb_lock_waits
PolarDB for MySQL 5.7information_schema.innodb_lock_waits
RDS for MySQL 8.0 and PolarDB for MySQL 8.0performance_schema.data_lock_waits

For RDS for MySQL 8.0 and PolarDB for MySQL 8.0, enable the performance_schema parameter before using transaction blocking analysis:

Trigger methods

Other lock analysis can be triggered in two ways:

MethodHowWhere results appear
ManualTrigger on demand from the Lock Analysis pageLock Analysis page
AutomaticTriggered each time the Instance Sessions page is refreshedUpper-right corner of the Instance Sessions page

Run a manual analysis

Create an analysis task

  1. Log on to the DAS console.

  2. In the left navigation pane, click Intelligent O &M Center > Instance Monitoring.

  3. Find the target instance and click the instance ID to go to the instance details page.

  4. In the left navigation pane, click Lock Analysis. In the Other Lock Analysis section, click Create Analysis Task.

image.png

View analysis results

Click the image icon for a diagnostic result to view metadata lock wait and transaction blocking information.

image.png

Transaction lock details

In the transaction lock list, click View Details in the Actions column. The details appear in two modes:

  • List: Displays blocked transactions as a list.

    image

  • View: Displays a visual transaction wait relationship graph. Click a session tile to view its details at the bottom of the panel.

    image.png

Metadata lock details

In the metadata lock list, click View Details in the Actions column. The view displays a session relationship graph. Click a session tile to see its details at the bottom. To resolve a metadata lock wait, kill the blocking session directly from this view.

image

Investigate Sleep sessions with SQL Explorer and Audit

If a suspicious session is in the Sleep state and no SQL information is available, the session likely has an open transaction whose SQL statements were executed but not yet committed or rolled back.

To investigate:

  1. In the left navigation pane of the instance, click SQL Explorer and Audit.

  2. On the Audit page, click Enable Advanced Query.

  3. Enter the thread ID of the suspicious session to query the SQL statements it executed.

This lets you determine whether the lock wait is caused by an uncommitted transaction.

image.png

View automated analysis results

From the Instance Sessions page

  1. Log on to the DAS console.

  2. In the left navigation pane, click Intelligent O &M Center > Instance Monitoring.

  3. Find the target instance and click the instance ID to go to the instance details page.

  4. In the left navigation pane, click Instance Sessions. DAS automatically triggers an analysis and displays results in the upper-right corner of the page.

    image.png

  5. If a lock wait exists, click View Details. The panel shows transaction locks (if any) and metadata locks (if any).

    image

Transaction lock details

In the transaction lock list, click View Details in the Actions column. The details appear in List and View modes, which work the same way as in manual analysis.

image.png

Metadata lock details

In the metadata lock list, click View Details in the Actions column. The relationship graph works the same way as in manual analysis.

image.png

From the Lock Analysis page

On the Lock Analysis page, click the image icon for a diagnostic result to view the historical statistics of automated analyses triggered from the Instance Sessions page. The viewing method is the same as for manual analysis.

image.png

What's next