On 6/18/2015 2:10 PM, Ben RUBSON wrote:
Hello,

In order for the slave to quickly show a communication issue between
the master and the slave, I set slave_net_timeout to 10.
"show slave status" then quickly updates, perfect.

I would also like the master to quickly show when the slave is no more
reachable.

However, "show processlist" and "show slave hosts" take a very long
time to update their status when the slave has gone.
Is there any way to have a refresh rate of about 10 seconds, as I did
on slave side ?

Thank you !

Ben


There are two situations to consider

1) The slave is busy re-trying. It will do this a number of times then eventually disconnect itself. If it does disconnect itself, the processlist report will show it as soon as that happens.

2) The connection between the master and slave died (or the slave itself is lost). In this case, the server did not receive any "I am going to disconnect" message from its client (the slave). So as far as the server is concerned, it is simply sitting in a wait expecting the client to eventually send in a new command packet.

That wait is controlled by --wait-timeout. Once an idle client connection hits that limit, the server is programmed to think "the idiot on the other end of this call has hung up on me" so it simply closes its end of the socket. There are actually two different timers that could be used, --wait-timeout or --interactive-timeout and which one is used to monitor the idle socket depends entirely on if the client did or did not set the 'interactive flag' when it formed the connection. MySQL slaves do not use that flag.

Now, if the line between the two systems died in the middle of a conversation (an actual data transfer) then a shorter -net-write-timeout or --net-read-timeout would expire and the session would die then. But I think you were not observing one of those failures.

Does that help?

--
Shawn Green
MySQL Senior Principal Technical Support Engineer
Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
Office: Blountville, TN

Become certified in MySQL! Visit https://www.mysql.com/certification/ for details.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql

Reply via email to