The max_user_connections parameter specifies the maximum number of connections that are allowed for a database on an AparaDB RDS for MySQL instance. If the "has more than 'max_user_connections' active connections" error message, the "User 'xxx' has exceeded the 'max_user_connections' resource" error message, or an error message related to the max_user_connections parameter is displayed when you connect to a database on an RDS instance, you can use the solutions that are described in this topic to fix this issue.
Problem description
You cannot connect to a database on an RDS instance by using Data Management Service (DMS) or a database client, and an error message related to the max_user_connections parameter is displayed.
Cause
The number of connections to the database on the RDS instance reaches the upper limit.
Solution
View the details of the established sessions of the RDS instance
Log on 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.
In the left-side navigation pane of the page that appears, choose
.On the page that appears, click the Session Management tab. On the Session Management tab, view the details of the established sessions on the RDS instance. For more information, see Session management.
View the configuration of the max_user_connections parameter of the database on the RDS instance.
You can use one of the following methods to view the value of the max_user_connections parameter:
Log on to the ApsaraDB RDS console.
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.
In the left-side navigation pane of the page that appears, click Parameters.
On the Modifiable Parameters tab, view the value of the max_user_connections parameter.
Log on to the database and execute the following statement to view the value of the max_user_connections parameter:
show variables like 'max_user_connections';
After you confirm that the memory resources are sufficient, change the value of the max_user_connections parameter to a larger value. For more information, see Modify the parameters that specify the maximum number of connections.
If the issue persists, use the following methods:
Troubleshoot connection issues of the RDS instance. For more information, see What do I do if the number of connections to an ApsaraDB RDS for MySQL instance reaches the upper limit?
Restart the RDS instance to release connections. For more information, see Restart an RDS instance.