# FATAL: remaining connection slots are reserved for non-replication superuser connections (RDS Proxy)

- **ID:** `aws/rds-proxy-max-connections-exceeded`
- **Domain:** aws
- **Category:** resource_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

The RDS Proxy has exhausted its maximum connection pool size (default 100) due to too many concurrent connections from applications, and the database instance itself is also at its max_connections limit.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| RDS Proxy (2023-03-15) | active | — | — |
| PostgreSQL 13.12 | active | — | — |
| MySQL 8.0.35 | active | — | — |

## Workarounds

1. **Increase the RDS Proxy's MaxConnectionsPercent and SessionPinningFilters in the proxy configuration via AWS Console or CLI: `aws rds modify-db-proxy --db-proxy-name my-proxy --max-connections-percent 120`. Also ensure the RDS instance's max_connections is at least 1.5x the proxy limit.** (90% success)
   ```
   Increase the RDS Proxy's MaxConnectionsPercent and SessionPinningFilters in the proxy configuration via AWS Console or CLI: `aws rds modify-db-proxy --db-proxy-name my-proxy --max-connections-percent 120`. Also ensure the RDS instance's max_connections is at least 1.5x the proxy limit.
   ```
2. **Implement connection pooling in the application using a library like HikariCP (Java) or pgBouncer (PostgreSQL) to reduce the number of concurrent connections to the proxy. Example: set `maximumPoolSize=10` in HikariCP config.** (85% success)
   ```
   Implement connection pooling in the application using a library like HikariCP (Java) or pgBouncer (PostgreSQL) to reduce the number of concurrent connections to the proxy. Example: set `maximumPoolSize=10` in HikariCP config.
   ```
3. **Monitor active connections using CloudWatch metrics for RDS Proxy (e.g., 'DatabaseConnections') and scale the DB instance to a larger size if needed.** (80% success)
   ```
   Monitor active connections using CloudWatch metrics for RDS Proxy (e.g., 'DatabaseConnections') and scale the DB instance to a larger size if needed.
   ```

## Dead Ends

- **** — Increasing only the RDS instance's max_connections without adjusting RDS Proxy's MaxConnectionsPercent will still cause the proxy to reject connections. (60% fail)
- **** — Restarting the RDS Proxy without scaling the instance or reducing application connections will result in the same error immediately after restart. (75% fail)
- **** — Assuming the error is a database authentication issue and resetting credentials, which does not address the connection limit. (35% fail)
