- Newest
- Most votes
- Most comments
If you are getting a build-up of connections on your RDS instance, it happens because your client library is not closing the socket to the RDS instance. You should review your code and ensure that:
- It closes sockets when you are done talking to the database
- Always re-use sockets (ie., employ connection pooling) to the database for subsequent queries.
If you cannot fix this behavior in your client software - then you can use the AWS with RDS MySQL. You can however not use this with a stand-alone MySQL server on EC2.
Ref: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy.html
Are you using mysql-connector-python? If so, do you close both the cursor and the connection after the process is finished? (Or do you use "with" to open them?)
By MySQL community engine, do you mean RDS for MySQL or MySQL installed on EC2?
RDS Proxy supports RDS for MySQL. However, it does not support MySQL installed on EC2.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy.html#rds-proxy.limitations-my
Relevant content
- asked a year ago
- asked 2 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 5 months ago