hieuhtr / Blog

Don’t be lazy. Don’t make excuses. No one cares. Work fucking harder.
Other
6 stars 2 forks source link

MySQL Slaves lag behind master #34

Open hieuhtr opened 7 years ago

hieuhtr commented 7 years ago

Issue:

Root cause:

Solution:

Think more

mysql> SHOW variables like `net_read_timeout` 
mysql> SET GLOBAL `net_read_timeout` = 360;
screen shot 2017-04-24 at 3 53 49 pm

Reference:

  1. https://dev.mysql.com/doc/refman/5.6/en/error-lost-connection.html
  2. https://dev.mysql.com/doc/refman/5.6/en/replication-options-slave.html#option_mysqld_slave-parallel-workers