MHA binlog Dump (GTID) zombie process cleanup

Source: Internet
Author: User

Master survives the state of the switch Masterha_master_switch--conf=/etc/masterha/app1.cnf--master_state=alive--new_master_host= 192.168.0.101--orig_master_is_new_slave--running_updates_limit=1000 An unexpected situation, the following error is reported:

View Source code:

Gets the executing process on the new master, which is the show processlist operation. and the obtained processlist information is analyzed and judged, if the new master currently exists Binlog dump or binlog dump gtid process, etc., you cannot switch.

SOURCE DBHELPER.PM Fragment

The reason for the error is that after the switch succeeded, the original master became slave, and the new slave on the Binlog dump Gtid thread did not stop, theoretically after the successful handover, due to the role of conversion, the original master into Slave,binlog dump  The Gtid process should stop running, why hasn't it been stopped? View the error log on the new master.

The connection is lost and the connection is lost, causing the slave not to receive the signal, so the process is not stopped.

This problem can be configured by the master-slave synchronous heartbeat detection time to trigger the master-slave detection in advance, so as to achieve slave Binlog dump Gtid process early stop. The system default master-slave detection time is 3600S. Configure the following to perform a stop slave on a slave that may become master;
Change Master to Master_heartbeat_period = 10;
Set global slave_net_timeout = 25;
Start slave; perform change master to Master_heartbeat_period = 10 at the current Lord;
Set global slave_net_timeout = 25; Can be directly configured in the configuration file Slave_net_timeout = 25 again manually cut the master again when the Binlog dump Gtid process was quickly cleaned up, will not error.

MHA binlog Dump (GTID) zombie process cleanup

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.