All Products
Search
Document Center

:"Use Connection to execute SQL, Lock wait times out 30s" is prompted when you use DMS to query data"

Last Updated:Feb 25, 2021

Problem description

The following message appears when you query data in DMS.

Use the connection to execute SQL statements. The Lock wait time out is 30s.

Cause

This error has nothing to do with the RDS Lock wait. DMS has a limitation, that is, one SQL window acts as a connection (to maintain session consistency and transactions). When an SQL statement is executed in DMS, the table is locked with a timeout of 30 seconds. If no result is returned for a long time, the following situations may occur in some browsers:

  • A time-out event is displayed, but the SQL statement is still being executed in the background.
  • The page is actively refreshed. The SQL statement is still being executed in the background.

In either case, SQL statements are still being executed in the backend and the connection is not disconnected. When a new SQL request is initiated, DMS uses the same connection to execute the statement. The error code is returned if an SQL statement is not executed within 30 seconds.

Solution

Open a new window to execute the SQL statement. If the error persists, use clients other than DMS for the second time.

Application scope

  • DMS