- Newest
- Most votes
- Most comments
Hello ,
What is the value of Idle client connection timeout
Regards Sabarish
I have seen this happening, however my MaxIdleConnectionsPercent was of a higher value. I tried reducing this and there was not much of a difference in behavior. The traffic pattern of my app is unpredictable. So, I monitored the app for some time and there were no issues because of the connections not being released quickly. Generally, after 24 hours connections are released
Thanks for your response. In my case, I have observed that reducing the MaxIdleConnectionsPercent value decreases the database connection usage. But I am concerned that during peak hours the connection usage still exceeds MaxIdleConnectionsPercent, even though there are only very few client connections.
RDS Proxy uses complex internal mechanisms to manage database connections, which can sometimes lead to behavior that may seem counterintuitive. While your configuration settings provide guidelines, RDS Proxy may scale connections beyond these limits based on various factors.
-
RDS Proxy's connection management: RDS Proxy uses advanced algorithms to determine the number of database connections to maintain. It considers factors such as current workload, historical patterns, and anticipated demand. The proxy aims to optimize performance and reduce connection latency by keeping a sufficient number of connections ready.
-
Scaling beyond expected limits: The high number of connections (600) you're observing during peak hours, despite lower client connections, could be due to several reasons:
- Connection pooling: RDS Proxy may be keeping connections open in anticipation of future requests, even if they're not actively used.
- Session pinning: Certain types of database operations can cause connections to be "pinned" to specific sessions, preventing their immediate release back to the pool.
- Traffic patterns: If your application experiences consistent traffic, the proxy might keep more connections open to optimize for this pattern.
- Lambda concurrency: High concurrency in Lambda functions might lead the proxy to open more connections to handle potential load, even if not all are actively used simultaneously.
- Best practices and configuration tweaks:
- Review and adjust the minimum and maximum connection settings in your RDS Proxy configuration.
- Monitor CloudWatch metrics for your RDS Proxy and RDS instance to understand connection usage patterns.
- Ensure your Lambda functions are properly reusing database connections when possible.
- Check the idle client timeout settings and adjust if necessary to reduce the number of open idle connections.
- Consider implementing your own connection monitoring on the client side to better understand actual database activity from the requester's standpoint.
Remember that while high connection counts may seem concerning, RDS Proxy is designed to manage these connections efficiently. If you're not experiencing performance issues, the current behavior might actually be optimal for your workload. However, if you're concerned about resource usage, you may want to experiment with adjusting the configuration parameters and closely monitor the results.
Sources
RDS Proxy causing a consistent increase in DB Connections from Lambda | AWS re:Post
Persistent High Connection Counts in RDS with Proxy: Seeking Community Insights and Solutions | AWS re:Post
RDS Sessions are increasing rapidly | AWS re:Post
Relevant content
- asked 4 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 7 months ago

That's 15 minutes.