azure-iot-sdk-rs icon indicating copy to clipboard operation
azure-iot-sdk-rs copied to clipboard

Increase the time between pings

Open CryZe opened this issue 3 years ago • 3 comments

Doing a ping every 8 seconds is just way too often, especially if it gets logged every time. This makes it so it's closer to the official IoT Hub SDKs.

CryZe avatar Sep 12 '22 14:09 CryZe

It seemed to be somewhere in the middle, sounded reasonable to me (also being a multiple of 60s), and with Rust being on the same level as C, that seemed appropriate.

CryZe avatar Nov 21 '22 18:11 CryZe

I believe it was shortened due to this issue #50

Need to improve the reconnect logic (or add reconnection really) to resolve that rule. My concern here would be decreasing the ping time causes disconnection issues which, at the moment, are worse than an overly eager ping.

Thoughts/feedback/experiences?

damienpontifex avatar Nov 26 '22 22:11 damienpontifex

We've definitely encountered the reconnection problem as well. We simply re-establish the connection when the error spam starts happening (with a simple "5 errors and no successful message in between" as a heuristic). I think #50 was mostly resolved by #53 and only the reconnection is the remaining problem. We've been running the branch here for a long time now and the increased ping times don't seem to cause any problems.

CryZe avatar Jan 11 '23 11:01 CryZe