Add warning if node setup takes too long #623
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Last couple of weeks we have been investigating some sdk lockup issues. In fact it's not a complete deadlock but a node setup (initial read subscription) that takes forever. In our observations the transmission is halfway aborted in the read request and then resumed in some sort of loop, so the Read request never finishes.
It's hard to reproduce the issue and if its limited to only Nanoleaf bulbs or also other devices and if the type of Border routers make a difference.
This PR adds a big fat warning in the log if we detect this situation if the node setup takes longer than 15 minutes.
It will keep logging this message every 15 minutes until the user takes action. There are only 5 slots available for node setup so if all 5 are taken, the server will stall setting up any new nodes.
The issue should not be ignored by the user but action taken, either by resolving the connectivity issue(s) or by reporting this to us so we can keep track.
example of the warning in the log: