All Products
Search
Document Center

PolarDB:FAQ about performance monitoring

Last Updated:Mar 01, 2026

This topic answers frequently asked questions about performance monitoring for PolarDB for MySQL clusters.

Connections

How do I check the maximum number of connections for my cluster?

The maximum number of connections depends on the node specifications. For details, see Compute node specifications for Enterprise Edition.

How do I troubleshoot connection exceptions?

Run SHOW PROCESSLIST to view active sessions. If you identify an abnormal user session, limit that user's connections:

ALTER USER xxx@'%' WITH MAX_USER_CONNECTIONS 4;

Why are there too many cluster connections?

The quick diagnostics feature of PolarDB for MySQL integrates some features of Database Autonomy Service (DAS). Use Performance Insight (original version) to evaluate the database load and identify the source of performance issues.

Why is the total number of sessions still high when the cluster is idle?

  1. Check active sessions. Run the following command to monitor active sessions in real time:

    SHOW PROCESSLIST;

    This lists all currently connected sessions and their states, such as querying or waiting for locks.

  2. Set a connection limit. On the Session Manager page or in the configuration parameters, adjust max_connections. Set the maximum to about 1.5 times the actual peak value to handle burst requests.

  3. Clean up idle sessions. Terminate sessions that have been idle for a long time or have completed their operations:

    • Manual termination: Run KILL <Connection ID> to terminate a specific session.

    • Automatic cleanup: Configure the automatic timeout mechanism in the console to reclaim connections idle longer than a specified threshold, such as 30 minutes.

Why can't the kill command terminate a session?

When you run kill, the system marks the session with a termination tag and waits for the kernel to terminate the operation. If the session involves a large transaction, it can only be terminated after the transaction rollback completes.

To check whether a session is rolling back, query information_schema.innodb_trx:

SELECT TRX_ID, TRX_STATE, TRX_STARTED, TRX_QUERY
FROM information_schema.innodb_trx
WHERE trx_mysql_thread_id = <Session ID>;

If TRX_STATE shows ROLLING BACK, wait for the rollback to complete. The kill operation runs automatically afterward.

Performance metrics

Why is the QPS of the primary node higher than that of a read-only node?

The primary node may be handling read requests in addition to write requests. Set Primary Node Accepts Read Requests to No to reduce access to the primary database.

Why is the IOPS consistently high?

This may be caused by large transactions. Use Performance Insight (original version) to evaluate the database load and identify the source of performance issues.

How do I find the cause of increased memory usage?

The quick diagnostics feature of PolarDB for MySQL integrates some features of DAS. Use Performance Insight (original version) to evaluate the database load and identify the source of performance issues.

Storage

Why is the data storage usage in the console different from the database size queried in the database?

The size queried from the database is based on the size defined for the table columns.