All Products
Search
Document Center

ApsaraDB RDS:View logs

Last Updated:Jun 02, 2026

Query error logs and slow query logs in the console or use SQL to troubleshoot issues.

Note

This topic covers error logs and slow query logs. Archived logs are covered in Back up ApsaraDB RDS for PostgreSQL data and Download a backup file.

Usage notes

  • Slow query log integrity: Under extreme conditions, slow query log records may be incomplete or lost:

    • The instance experiences performance bottlenecks.

    • The instance receives a high volume of SQL requests.

    • The slow query log collection component 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, select Logs or Logs, and then specify a time range to view the log details.

    Type

    Description

    Error log

    Records database errors from the last month.

    Slow query log details

    Records SQL statements from the last 7 days that took more than 1 second to execute. Similar statements are deduplicated.

    Note
    • For instances in the China (Zhangjiakou) region, only the error logs and slow query log details from the last 9 days are retained.

    • The system collects csvlog file content and stores it on a log server. Modify the rds_max_log_files parameter to adjust the maximum number of retained csvlog files. More csvlog files extend the queryable time range but consume more storage.

API reference

API

Description

DescribeSlowLogs

Queries slow query logs.

DescribeSlowLogRecords

Queries slow query log details.

DescribeErrorLogs

Queries error logs for an instance.

DescribeBinlogFiles

Queries the write-ahead log (WAL) files for an instance.

DescribeSQLLogRecords

Queries SQL audit logs for an instance.

DescribeSQLLogFiles

Queries the SQL audit log files for an instance.