All Products
Search
Document Center

ApsaraDB RDS:View error logs and slow query logs

Last Updated:May 10, 2026

You can view error logs and slow query logs for an instance on the Logs page in the ApsaraDB RDS console to troubleshoot issues.

Note

This topic describes how to view error logs and slow query logs. For information about binary logs, see automatic backup and download backup.

For log management on other database engines, see these topics:

Usage notes

  • For an instance in the China (Zhangjiakou) region, error logs are retained for 9 days, while data on the Slow Log Details and Slow Log Summary tabs is retained for 7 days.

  • The error logs do not contain deadlock logs. To view deadlock logs, go to the instance details page. In the left-side navigation pane, choose Autonomy Services > Diagnostics and click the Lock Analysis tab.

  • Slow query log completeness: In the following extreme scenarios, slow query logs may be incomplete or partially lost:

    • The instance is under high load and has a performance bottleneck.

    • The instance receives a high volume of SQL requests.

    • The control service component that collects slow query logs malfunctions.

View logs

  1. Log on to the ApsaraDB RDS console and go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the instance ID.

  2. In the left-side navigation pane, click Logs.

  3. On the Logs page, click the Error Logs, Slow Log Details, or Slow Log Summary tab. Select a time range. The details for the selected period appear automatically.

  4. Item

    Description

    Binlog Subscription

    Subscribe to binary logs by using Data Transmission Service (DTS).

    Error logs

    • Records database runtime errors. By default, logs are retained for 30 days, but this period can vary by region. For example, logs for instances in the China (Zhangjiakou) region are retained for 9 days.

    • To view complete deadlock logs in the error logs, you must enable the following parameters on the RDS instance management page:

      • Enable the innodb_deadlock_detect parameter.

      • Enable the innodb_print_all_deadlocks parameter, and set the log_error_verbosity parameter to 3.

    Slow Log Details

    Records individual SQL statements that ran for more than 1 second within the last 7 days. You can change this threshold by modifying the long_query_time parameter in parameter settings. Similar statements are deduplicated.

    Note

    The console updates once per minute.

    Slow Log Summary

    Contains a statistical summary and analysis report of SQL statements that ran for more than 1 second within the last 7 days. You can change the threshold by modifying the long_query_time parameter in parameter settings.

    Note

    Slow log summary data is not collected in real time and may have a latency of 6 to 8 hours.

FAQ

The error logs contain many entries like "[MY-000111] [Server] Binlog cache free flush message: Enter binlog cache free flush". Does this have any impact?

These log entries indicate that MySQL is performing normal binary log cache management. They do not affect system operations. To filter out these log messages, use one of the following methods:

  • Modify the loose_log_error_suppression_list parameter to add the log ID [MY-000111].

  • Set the log_error_verbosity parameter to 1. However, if you set the parameter to this value, you can no longer view deadlock information.