3211
MySQLERRORCommonReplicationHIGH confidence
Replication channel thread cannot stop
Production Risk
High — replication in indeterminate state.
Why it happens
- 1Attempting to STOP REPLICA on a channel that is blocked or stuck.
- 2Replication thread deadlock or hung transaction preventing clean shutdown.
How to reproduce
trigger — this will error
trigger — this will error
STOP REPLICA FOR CHANNEL 'channel1';
expected output
ERROR 3211 (HY000): Replication thread is unable to stop.
Fix 1
Wait and retry STOP REPLICA
Wait and retry STOP REPLICA
STOP REPLICA FOR CHANNEL 'channel1';
Why this works
Sometimes a second attempt succeeds after the thread resolves its blocked state.
Fix 2
Restart MySQL to force-stop all replication threads
Restart MySQL to force-stop all replication threads
-- Restart the MySQL service.
Why this works
Server restart terminates all threads cleanly.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 3211 ER_REPLICATION_THREAD_CANNOT_STOP
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev