Common SQL Errors

MySQL Error 1190: ER_MASTER_NET_WRITE - How to Fix Replication "Net error writing to master"

Galaxy Team
August 6, 2025

MySQL cannot write binary log events across the network to a replica, breaking replication and returning ER_MASTER_NET_WRITE (SQLSTATE 08S01).

Sign up for the latest in common SQL errors from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

What is MySQL error 1190 (ER_MASTER_NET_WRITE)?

MySQL Error 1190: ER_MASTER_NET_WRITE happens when the master server fails to send binary-log data to a replica because the network write times out or drops. Check network latency, raise net_write_timeout, and restart replication with START SLAVE to restore syncing.

Error Highlights

Typical Error Message

Net error writing to master

Error Type

Replication Error

Language

MySQL

Symbol

ER_MASTER_NET_WRITE

Error Code

1190

SQL State

08S01

Explanation

Table of Contents

What does “Net error writing to master” mean?

MySQL throws ER_MASTER_NET_WRITE (error 1190, SQLSTATE 08S01) when the source instance tries to stream binary-log events to a replica but cannot finish the network write. The replication I/O thread on the replica closes the connection, replication stops, and SHOW SLAVE STATUS reports the error.

Because replication halts, transactions committed on the source never reach downstream replicas, risking data drift and stale reads.

Production workloads that rely on read replicas may face inconsistent results until the issue is fixed.

When does error 1190 commonly appear?

The error surfaces during asynchronous or semisynchronous replication on MySQL 5.5 and newer. It is logged on the master if the write fails, and on the replica as “I/O error reading from master” immediately afterward.

It often follows network interruptions, high latency, or overloaded servers that exceed net_write_timeout.

Why is resolving ER_MASTER_NET_WRITE critical?

Unresolved replication gaps grow over time, forcing expensive full re-syncs or causing irreversible data divergence. Fast remediation preserves data integrity, keeps replicas usable for failover, and avoids unplanned downtime.

What Causes This Error?

Most cases trace back to unstable network links between master and replica.

Packet loss, firewall drops, or VPN flaps interrupt the TCP stream, so the master cannot flush binlog data.

Large transactions or long-running bulk inserts can exceed net_write_timeout or slave_net_timeout, leading to timeouts even on healthy links.

Resource saturation on the master, such as high CPU or disk I/O, slows binlog flushing and delays network writes until the connection times out.

Version or parameter mismatches, including disabled binary logging, semisync plugin bugs, or incompatible TLS settings, occasionally trigger the write failure.

How to Fix MySQL Error 1190

First verify connectivity: ping, traceroute, and MySQL client logins from the replica to the master.

Fix any network instability or firewall rules blocking port 3306.

Review net_write_timeout (master) and slave_net_timeout (replica). Temporarily raise both to 120 or 300 seconds, then retry replication. Longer timeouts tolerate latency spikes.

Restart replication cleanly: on the replica execute STOP SLAVE; START SLAVE;.

Check SHOW SLAVE STATUS until Seconds_Behind_Master drops and Last_IO_Errno becomes 0.

If logs show a large transaction near the failure time, split the transaction or enable binlog_row_image = MINIMAL to shrink event payloads.

Common Scenarios and Solutions

Cloud region link outage – Wait for the provider to restore connectivity, then START SLAVE or CHANGE MASTER TO MASTER_AUTO_POSITION=1 to resume GTID-based replication.

Bulk load exceeding timeout – Increase net_write_timeout to 300 and split the load into smaller batches.

Overloaded master – Tune innodb_flush_log_at_trx_commit, sync_binlog, or add IOPS.

Offload heavy reads to replicas via Galaxy’s query routing to reduce master stress.

Best Practices to Avoid This Error

Place replicas in the same availability zone or use dedicated replication links to minimize latency and packet loss.

Monitor Round-Trip Time, Seconds_Behind_Master, and Replica_IO_Running with Prometheus or MySQL Enterprise Monitor.

Alert on spikes before timeouts occur.

Set net_write_timeout, net_read_timeout, and slave_net_timeout to balanced values (60-120s) based on workload latency.

Enable GTID replication so replicas can auto-position after transient disconnects without manual log-file bookkeeping.

Related Errors and Solutions

Error 1158 ER_NET_READ_ERROR_FROM_PIPE – Read failure instead of write; fix network or increase net_read_timeout.

Error 1159 ER_NET_FCNTL_ERROR – Socket control failure; check OS ulimit and open-files count.

Error 1236 ER_MASTER_FATAL_ERROR_READING_BINLOG – Replica cannot parse binlog; ensure identical MySQL versions or upgrade.

Error 1593 ER_IO_THREAD_SHUTDOWN_COMPLETE – I/O thread stopped after repeated write errors; restart replication.

.

Common Causes

Related Errors

FAQs

Does increasing net_write_timeout risk data loss?

No. It only extends how long MySQL waits before declaring the network write failed. Transactions remain durable.

Can I ignore the error if replication catches up later?

Do not ignore it. Each occurrence pauses replication. Frequent gaps can mask data divergence and break failover plans.

Will enabling semi-sync replication prevent error 1190?

Semi-sync still uses the same socket. The error can occur; however, ACK monitoring may detect delays sooner.

How does Galaxy help?

Galaxy’s SQL editor quickly surfaces SHOW SLAVE STATUS output, shares remediation queries, and stores endorsed runbooks so teams can respond faster.

Start Querying with the Modern SQL Editor Today!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Check out some other errors

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo