RDS connections issue

0
  1. I'm encountering an issue with RDS connections where they're not being properly deleted after disconnection. This results in a rapid increase in the number of connections, even though they're not actively in use. Is there a solution to immediately delete the connection after disconnecting through Python code?
  2. Can MySQL community engine support the usage of RDS proxy?
2개 답변
1

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:

  1. It closes sockets when you are done talking to the database
  2. 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

AWS
전문가
답변함 2달 전
profile picture
전문가
검토됨 2달 전
0

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

profile picture
전문가
shibata
답변함 2달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠