The ER_STOP_SLAVE_IO_THREAD_TIMEOUT error indicates that a STOP SLAVE command was issued but the IO thread is still processing a task and has not stopped within the allowed timeout period.
ER_STOP_SLAVE_IO_THREAD_TIMEOUT occurs when a STOP SLAVE command waits too long for the replication IO thread to finish its current work. Increase the slave_net_timeout value or investigate IO thread stalls, then restart replication to resolve the issue.
ER_STOP_SLAVE_IO_THREAD_TIMEOUT
The error appears when a STOP SLAVE or STOP REPLICA command is issued and MySQL waits for the replication IO thread to halt. If the IO thread remains busy beyond the timeout, MySQL raises error 1876 with SQLSTATE HY000.
Because the IO thread fetches binary log events from the source, failing to stop cleanly can leave replication in an uncertain state. Addressing the timeout ensures data consistency and safe maintenance operations.
The primary trigger is a long-running fetch or network read that prevents the IO thread from acknowledging the stop request.
Slow or unreliable network links between source and replica often extend fetch times, hitting the timeout threshold.
Large transactions in the source binary log can lock the IO thread until the complete event group is received.
Low slave_net_timeout or replica_net_timeout settings shorten the allowed wait, making timeouts more likely during peak load.
First, identify whether the thread is genuinely stuck or only needs more time. Check SHOW PROCESSLIST and SHOW SLAVE STATUS to confirm the IO thread state.
If the IO thread is Waiting for master to send event, increase slave_net_timeout or replica_net_timeout and issue STOP SLAVE again.
If the IO thread is locked on a network read, investigate connectivity or SSL issues. Resolve them, then restart replication.
During planned maintenance, DBAs often stop replication to apply patches. Large binary logs can delay the stoppage and trigger this error; raising the timeout temporarily prevents failure.
Cloud instances with intermittent bandwidth may see frequent timeouts. Enabling network compression (slave_compressed_protocol) and tuning net_read_timeout reduces risk.
Set slave_net_timeout to a value that covers your largest expected transaction or network pause, typically 60-120 seconds in modern environments.
Monitor replication lag and IO thread status via Performance Schema or third-party tools so you can intervene before a timeout is raised.
Use Galaxy’s alerting to surface long-running IO waits directly in your SQL workflow, letting you adjust timeouts or investigate network issues early.
Error 1872 ER_SLAVE_RELAY_LOG_WRITE_FAILURE surfaces when the relay log cannot be written. Unlike error 1876, it affects the SQL thread rather than the IO thread.
Error 1201 HY000: Could not initialize master info structure occurs when replication metadata is inaccessible. Fix by repairing or recreating the mysql.slave_master_info table.
Versions 5.7.2 and later default slave_net_timeout to 30 seconds, which may be too low for busy or distant replicas.
GTID or row-based replication can package big event groups that hold the IO thread until fully received.
Packet loss or high latency between source and replica slows IO fetches and increases stop time.
Disk saturation or slow relay log writes lengthen the time the IO thread needs to finish its current task.
Relay log disk write failed. Indicates disk or permission issues rather than timeout.
Replica cannot read the source binary log. Usually caused by log corruption or missing files.
Generic fatal replication error that stops both IO and SQL threads.
Not immediately. The IO thread continues fetching events until stopped. However, forcing a stop without completion can leave replication mid-transaction.
slave_net_timeout (MySQL 5.7) and replica_net_timeout (MySQL 8.0) define how long MySQL waits for the IO thread.
No. Repeated timeouts signal network or configuration issues that can escalate into lag or replication stoppage.
Galaxy surfaces replication thread states in its editor sidebar and lets you adjust timeout variables with autocomplete, reducing guesswork and downtime.