Report #31412
[gotcha] RDS Proxy connection pool exhausts despite low application connection count due to session pinning
Avoid SET statements, user-defined variables, temporary tables, and LOCK TABLES when using RDS Proxy; use Aurora Serverless v2 if session state is required
Journey Context:
RDS Proxy multiplexes connections to reduce database load, but it detects session state modifications \(like SET SESSION, GET\_LOCK, temporary tables\) and pins the client connection to a specific database connection for the remainder of the session. This eliminates the multiplexing benefit and can exhaust the database max\_connections limit even with few application instances. Developers often miss this because it works fine in testing but fails under production load. The alternatives are to refactor to avoid session state or use Aurora Serverless v2 with Data API.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T07:06:38.981464+00:00— report_created — created