View error logs and slow query logs

更新时间:
复制 MD 格式

You can view the error logs and slow query logs for your Simple Application Server database service instances on the Log Management page in the console to help you troubleshoot issues. This topic describes how to view the details of error logs and slow query logs.

Limits

  • Error logs are retained for 30 days.

  • Slow query log details are retained for 7 days.

Procedure

  1. Go to the Simple Database Service page in the Simple Application Server console.

  2. On the card for the database service instance, click the instance ID.

    If you have many database service instances, you can enter an instance ID in the search box to filter the list.

  3. Click the Log Management tab. Then, click the Error Log or Slow Log Details tab and select a time range to view the log information.

    The following table describes the logs.

    Log type

    Description

    Error log

    By default, records logs for database errors from the last month.

    Slow query log details

    By default, records and deduplicates similar SQL statements from the last 7 days that have a running time of more than 1 second.

    The threshold of 1 second is the value of the long_query_time database parameter. You can modify the value of long_query_time. For more information, see Modify database parameters.

    Note

    The console updates slow query log details every minute.