spencerlambert / mysql-events

A node meteor package that watches a MySQL database and runs callbacks on matched events.
Other
89 stars 75 forks source link

ER_MASTER_FATAL_ERROR_READING_BINLOG error when restart on zongji.on('error') is called #30

Open sophiaWang611 opened 7 years ago

sophiaWang611 commented 7 years ago

setTimeout(function() { if(!newInst.child) { console.log("dbWarcher error restart ZJ:") var newInstNext = zongjiManager(dsn, options, onBinlog); newInst.stop(); newInst = newInstNext; newInst.child = true; } }, RETRY_TIMEOUT);

if database changed in "RETRY_TIMEOUT" time, restart zongji will case "ER_MASTER_FATAL_ERROR_READING_BINLOG: ".

full error message:

{ Error: ER_MASTER_FATAL_ERROR_READING_BINLOG: Client requested master to start replication from position > file size; the first event '' at 465694, the last event read from '/home/mysql/data3067/mysql/mysql-bin.000433' at 4, the last byte read from '/home/mysql/data3067/mysql/mysql-bin.000433' at 4