Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Instance check leads to UnreachableMaster (LastCheckValid: false) if instance check takes longer than 1s #1367

Closed
binwiederhier opened this issue Jun 15, 2021 · 2 comments

Comments

@binwiederhier
Copy link
Contributor

Our MySQL hosts are under considerable load, to the point that quite frequently, the analysis returns LastCheckValid: false, even though the host is up and responsive:

analysis: ClusterName: ...:3306, IsMaster: true, LastCheckValid: false, LastCheckPartialSuccess: true, 
CountReplicas: 2, CountValidReplicas: 2, CountValidReplicatingReplicas: 2, CountLaggingReplicas: 0, 
CountDelayedReplicas: 0, CountReplicasFailingToConnectToMaster: 0

After looking at Wireshark dumps, it seems that our hosts sometimes take slightly longer than 1s to perform these checks (2-3s, sometimes even longer), which is arguably not great, but still ok for us. From my understanding of the code, if a check takes longer than 1s (hardcoded), Orchestrator considers the host to be down, which may lead to emergent actions and eventually to failovers if those fail.

I've deduced this from these parts of the code:

I propose to making this 1s timeout configurable as ReasonableInstanceCheckSeconds.

Did I get all of this right? What do you think about the proposal? I am happy to provide all the info that's needed here.

@shlomi-noach
Copy link
Collaborator

This makes sense. I remember going to opposite direction, this used to be configurable and moved to a constant in an attempt to reduce variance and configuration complexity. But honestly my memory may not serve me well. Thank you for submitting a PR!

@binwiederhier
Copy link
Contributor Author

Closing this as the PR is merged.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants