1482
MariaDBERRORNotableTransactionsHIGH confidence
XA transaction branch was rolled back due to timeout
Production Risk
High — the transaction was rolled back; data changes were not committed.
What this means
ER_XA_RBTIMEOUT (1482, SQLSTATE XA102) is raised when an XA transaction branch is automatically rolled back because it exceeded the timeout for the prepare or commit phase.
Why it happens
- 1XA transaction took too long in the prepared state
- 2Coordinator failed to send XA COMMIT within the timeout window
How to reproduce
trigger — this will error
trigger — this will error
XA START 'txn1'; -- Long delay... XA END 'txn1'; XA PREPARE 'txn1'; -- Timeout occurs before XA COMMIT
expected output
ERROR 1482 (XA102): XA_RBTIMEOUT: Transaction branch was rolled back
Fix
Optimize the distributed transaction or check the coordinator
Optimize the distributed transaction or check the coordinator
-- Recover orphaned XA transactions: XA RECOVER; -- Clean up rolled-back transactions: XA ROLLBACK 'txn1';
Why this works
XA transactions must be completed within the timeout window; optimize the distributed transaction coordinator.
Sources
Official documentation ↗
MySQL 8.0 — 1482 ER_XA_RBTIMEOUT
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev