All Products
Search
Document Center

ApsaraDB RDS:What do I do if the "has more than 'max_user_connections'" or "has exceeded the 'max_user_connections'" error message is displayed when I connect to an ApsaraDB RDS for MySQL instance?

Last Updated:Mar 28, 2026

The max_user_connections parameter sets the maximum number of connections allowed for a database on an ApsaraDB RDS for MySQL instance. When this limit is reached, new connections are rejected with one of the following errors:

  • has more than 'max_user_connections' active connections

  • User 'xxx' has exceeded the 'max_user_connections' resource

To resolve this, identify which sessions are consuming connections, then either release them or raise the connection limit.

Identify the cause

Before adjusting max_user_connections, confirm that the connection limit is the problem and find out which sessions are holding connections.

Check the current connection limit

To see the current value of max_user_connections, run:

show variables like 'max_user_connections';

View active sessions

Use one of the following methods to see which sessions are open.

Using the ApsaraDB RDS console:

  1. Log on to the ApsaraDB RDS console. In the top navigation bar, select the region where the instance resides. Find the instance and click its ID.

  2. In the left-side navigation pane, choose Autonomy Services > Diagnostics.

  3. On the Diagnostics page, click Session Management to view all sessions, active sessions, and abnormal sessions, including details such as User, Hostname, Execution Duration (s), and Status.

For more information, see Session management.

Using SQL:

To list all active threads and identify which accounts and source IP addresses are holding connections, run:

SHOW PROCESSLIST;

The Host column shows the source IP address of each connection.

If the connection limit has been reached and you cannot open a new session, connect from an Elastic Compute Service (ECS) instance or use Data Management (DMS), which can reuse historical sessions already established to the RDS instance. For more information, see How do I connect to an ApsaraDB RDS instance? and Use DMS to log on to an ApsaraDB RDS for MySQL instance.

Using SQL Explorer and Audit:

If you need a historical record of which accounts and IP addresses have been executing statements, enable the SQL Explorer and Audit feature. It records SQL statements from the database kernel, the accounts and IP addresses that executed them, and execution details — without affecting instance performance.

The SQL Explorer and Audit feature is a paid feature. For billing details, see Billing rules.

To enable it:

  1. Log on to the ApsaraDB RDS console. In the top navigation bar, select the region where the instance resides. Find the instance and click its ID.

  2. In the left-side navigation pane, choose Autonomy Services > SQL Explorer and Audit.

  3. Enable the SQL Explorer and Audit feature.

For more information, see Use the SQL Explorer and Audit feature.

Solution

  1. Review active sessions. In the ApsaraDB RDS console, go to Autonomy Services > Diagnostics > Session Management and view the details of the established sessions. For more information, see Session management.

  2. Check the connection limit. Use the console or the SQL statement above to confirm the current value of max_user_connections. To view it in the console:

    1. Log on to the ApsaraDB RDS console and click the instance ID.

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

    3. On the Modifiable Parameters tab, find max_user_connections and note its current value.

  3. Raise the connection limit. After confirming that the instance has enough memory, increase the value of max_user_connections. For instructions, see Modify the parameters that specify the maximum number of connections.

  4. If the problem persists, try the following: