Bug #87409 mysqlbinlog also needs a --network-timeout option
Submitted: 14 Aug 2017 11:08
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Command-line Clients Severity:S4 (Feature request)
Version:5.7.19 OS:Any
Assigned to: CPU Architecture:Any

[14 Aug 2017 11:08] Shane Bester
In https://bugs.mysql.com/bug.php?id=46103 mysqldump implemented --network-timeout.

Turns out we need this also when dumping large binary logs using the --read-from-remote-server option, especially when piping them via scripts or importing them.     

Workaround:  on server configure larger net_write_timeout

How to repeat:
read a large binlog from a live server.
the binlog dump connection dies after ~30 seconds (net_write_timeout).

Suggested fix:
Similar as what we have in 8.0 mysqldump.cc :  this, although I have idea why 700 was hardcoded...

  if (opt_network_timeout)
    uint timeout= 700;
    ulong max_packet_allowed= 1024L*1024L*1024L;

    /* set to maximum value which is 1GB */