RDS MySQL connection pool exhaustion after upgrading to ac-2020 database module

Since upgrading our database module to ac-2020 two weeks ago, we’re experiencing frequent connection pool exhaustion on our RDS MySQL instance. Our application throws connection timeout errors during peak hours, causing transaction failures that impact about 15% of our user base.

We’re running a 4-core 16GB RDS MySQL 8.0 instance with the following configuration:


max_connections = 1000
wait_timeout = 28800
interactive_timeout = 28800

Our application connection pool settings haven’t changed (min=10, max=100 per service, 5 microservices). CloudMonitor shows connection count spiking to 950+ during failures, but we never had this issue with the previous database module version. Is there something different about connection pooling behavior in ac-2020?

Ac-2020 introduced stricter connection management and changed the default wait_timeout from 28800 to 7200 seconds. Even though you explicitly set it to 28800, check if there’s a parameter group override. Also verify if your application is properly closing connections.

Have you looked at CloudMonitor’s connection pool metrics? The ac-2020 upgrade added new metrics like ConnectionPoolUtilization and ConnectionPoolWaitTime that can help identify if the issue is on the RDS side or application side. These weren’t available in previous versions.

Interesting point about idle connections. I’m seeing thousands of “Aborted connection” warnings in the RDS slow query log. Could this be related to the connection validation mechanism in ac-2020?

Yes, definitely related. Ac-2020 added a new connection validation layer that performs health checks every 60 seconds by default. If your application’s connection pool doesn’t respond to these validation queries within 5 seconds, RDS marks the connection as aborted and closes it. This is why you’re seeing the spike - your pool thinks it has 100 connections but RDS has already closed half of them. Check the new parameter connection_control_failed_connections_threshold in your RDS console.

Also worth noting that ac-2020 changed the connection lifecycle management. The module now enforces max_connections more strictly and includes system/monitoring connections in the count, whereas older versions excluded them. So your effective max_connections for application use is actually around 950, not 1000. This explains why you’re hitting the limit.

Based on your configuration and symptoms, here’s a comprehensive solution addressing all three focus areas:

Root Cause: The ac-2020 database module introduced significant changes to connection lifecycle management that affect max_connections, connection pooling behavior, and CloudMonitor integration.

1. Max_Connections Management (AC-2020 Changes): Ac-2020 now includes system connections in the max_connections count:

  • RDS monitoring: ~20 connections
  • Backup processes: ~15 connections
  • CloudMonitor agents: ~10 connections
  • Your effective application limit: ~955 connections (not 1000)

With 5 microservices × 100 max connections = 500 theoretical max, but connection leaks or slow queries can push this higher. Increase max_connections:


max_connections = 1500
max_user_connections = 1200

2. Connection Pooling Optimization: Ac-2020’s new validation layer requires application-side adjustments:

Application Pool Settings (for each microservice):

  • testOnBorrow = true (critical for ac-2020)
  • validationQuery = “SELECT 1”
  • validationTimeout = 3000ms
  • timeBetweenEvictionRunsMillis = 30000
  • minEvictableIdleTimeMillis = 180000 (reduced from 600000)
  • maxWait = 10000ms

RDS Parameters to Adjust:


wait_timeout = 7200
interactive_timeout = 7200
connection_control_failed_connections_threshold = 10
max_connect_errors = 100

The key change: align your wait_timeout with ac-2020’s default (7200s) rather than fighting it with 28800s. The module’s connection validator expects this value.

3. CloudMonitor Integration: Ac-2020 added enhanced connection monitoring. Set up these alerts:

  • ConnectionPoolUtilization > 85%
  • ConnectionPoolWaitTime > 100ms
  • ActiveConnections approaching max_user_connections
  • AbortedConnections rate > 10/minute

Access these via CloudMonitor → RDS → Instance Metrics → Connection Pool (new in ac-2020).

Additional AC-2020 Specific Settings:


performance_schema = ON
max_prepared_stmt_count = 32768

The performance_schema integration with ac-2020 helps identify connection leaks in real-time.

Implementation Order:

  1. Update RDS parameters (requires reboot during maintenance window)
  2. Deploy application pool configuration changes
  3. Configure CloudMonitor alerts
  4. Monitor for 48 hours
  5. Adjust max_connections if needed

Verification: After implementing these changes, your connection pool exhaustion should resolve. The “Aborted connection” warnings will decrease by 90%+. The spike to 950+ connections was caused by the validation layer marking connections as stale while your application pool still counted them as active - this mismatch is now eliminated.

Monitor CloudMonitor’s new ConnectionPoolUtilization metric - it should stabilize under 70% during peak hours with these settings.

We had a similar issue. The ac-2020 database module changed how idle connections are tracked. Check your application logs for “Communications link failure” errors - this usually means connections are being marked as stale faster than before. We had to reduce our connection pool idle timeout from 600s to 300s to match the new behavior.