Report #78840
[gotcha] AWS RDS Proxy returns 'Commands out of sync' or silent failures with MySQL prepared statements
Disable prepared statements in your ORM/database driver \(e.g., MySQL Connector/J useServerPrepStmts=false, SQLAlchemy prepared\_statement=False\); use parameterized queries \(client-side\) instead; do not use RDS Proxy for workloads requiring server-side prepared statements.
Journey Context:
ORMs like Hibernate or SQLAlchemy default to using prepared statements for performance. RDS Proxy multiplexes connections and does not support the MySQL binary protocol's prepared statement commands \(COM\_STMT\_PREPARE, COM\_STMT\_EXECUTE\). When the driver tries to prepare a statement, the proxy either returns a confusing 'Commands out of sync' error or silently fails, causing the app to hang or retry indefinitely. The only solution is to force the driver to use client-side parameter binding \(text protocol\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T14:55:39.515385+00:00— report_created — created