1 Answer
- Newest
- Most votes
- Most comments
0
Hi there,
It seems that your database connections exceed the max_connections value and the reasons for that could be:
- Increases in the number of client/application connections to the DB instance, caused by an increased workload or table/row-level locking.
- Improperly closing a client/application connection after the end of an operation. When a server connection isn't properly closed, the client application opens up a new connection. Over time, these new server connections can cause your instance to exceed the max_connections parameter value.
- To list all active connections in your MySQL DB instance, use the SHOW FULL PROCESSLIST command.
- Sleeping connections (also known as inactive open connections) are caused by higher connection timeout parameters (such as wait_timeout or interactive_timeout). If you configure a connection limit that's too high, then you can end up with higher memory usage even if those connections aren’t used. As a result, when the application server tries to open all client connections to the database, these connections might be refused.
- To terminate a sleeping connection, use the mysql.rds_kill operation (see reference 1).
- It is best practice to only configure the active connections that are required for application performance. You might also consider upgrading to a larger Amazon RDS DB instance class.
- You can also consider increasing max_connections parameter value depending on the instance type that you are using and workload requirements (see reference 2). References:
[1]https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/mysql_rds_kill.html
[2]https://aws.amazon.com/premiumsupport/knowledge-center/aurora-mysql-max-connection-errors/
answered 2 years ago
Relevant content
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated 2 years ago