You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are having an issue with a MQTTnet client that only reconnects after thinking it's been disconnected for around 15 minutes. In reality, there was only a hiccup in the network when a network switch was turned off and the internet is routed through a backup switch. We have clients that reconnect normally but this one that doesn't reconnect does sent a lot of messages, one every few seconds, we feel like this is the difference.
We are on the latest nuget package 4.3.5.114 running on .net 6.
I have not been able to reproduce this locally, only at a site with real networks and multiple internet providers plugged into redundant switches.
Debug from the issue is attached at the end, You can see the disconnect doesn't happen until 14:43 even though there have been send errors going on since 14:29.
Here is an example of it working normally from the same machine, without many publish messages. You can see the ping fail, disconnect, reconnect like you would expect.
Should normal publish messages failing cause a disconnect?
We are having an issue with a MQTTnet client that only reconnects after thinking it's been disconnected for around 15 minutes. In reality, there was only a hiccup in the network when a network switch was turned off and the internet is routed through a backup switch. We have clients that reconnect normally but this one that doesn't reconnect does sent a lot of messages, one every few seconds, we feel like this is the difference.
We are on the latest nuget package 4.3.5.114 running on .net 6.
Connection options
.WithAutoReconnectDelay(5))
.WithMaxPendingMessages(25)
.WithMaxTopicFiltersInSubscribeUnsubscribePackets(8)
.WithPendingMessagesOverflowStrategy(MqttPendingMessagesOverflowStrategy.DropOldestQueuedMessage)
I have not been able to reproduce this locally, only at a site with real networks and multiple internet providers plugged into redundant switches.
Debug from the issue is attached at the end, You can see the disconnect doesn't happen until 14:43 even though there have been send errors going on since 14:29.
1. Issue starts at 12-18 14:29:56.427
2. 12-18 14:29:56.427 | IOTCore Publisher Trace >> ClientID, [2024-12-18T19:29:56.4267204Z] [42] [MqttChannelAdapter] [Verbose]: TX (2 bytes) >>> PingReq
3. 12-18 14:29:56.433 | IOTCore Publisher Trace >> ClientID, [2024-12-18T19:29:56.4290590Z] [18] [ManagedMqttClient] [Error]: Error while publishing application message (972efaa0-46d9-4fe6-92ca-72816572e15c).
4. These continue every few minutes
5. 12-18 14:38:18.529 | IOTCore Publisher Trace >> ClientID, [2024-12-18T19:38:18.5271939Z] [44] [ManagedMqttClient] [Error]: Error while publishing application message (4d6c96f4-4746-41b1-828c-36a63f1098fd).
12-18 14:38:18.530 | IOTCore Publisher Trace >> ClientID, [2024-12-18T19:38:18.5298989Z] [44] [MqttChannelAdapter] [Verbose]: TX (6735 bytes) >>> Publish: [ClientID=Topic/Heartbeat/] [PayloadLength=6611] [QoSLevel=AtMostOnce] [Dup=False] [Retain=False] [PacketIdentifier=0]
5. Keep alive stops
6. 12-18 14:30:11.654 | IOTCore Publisher Trace >> ClientID, [2024-12-18T19:30:11.6513841Z] [10] [MqttClient] [Warning]: Error when sending MqttPingReqPacket request packet
7. 12-18 14:30:11.658 | IOTCore Publisher Trace >> ClientID, [2024-12-18T19:30:11.6577326Z] [10] [MqttClient] [Verbose]: Stopped sending keep alive packets
8. Disconnect and reconnect happens
9. 12-18 14:43:39.204 | IOTCore Publisher Trace >> ClientID, [2024-12-18T19:43:39.2035323Z] [42] [MqttClient] [Verbose]: Disconnecting [Timeout=00:01:40]
10. 12-18 14:43:39.228 | IOTCore Publisher Trace >> ClientID, [2024-12-18T19:43:39.2275252Z] [42] [MqttClient] [Verbose]: Disconnected from adapter.
11. 12-18 14:43:39.228 | IOTCore Publisher Trace >> ClientID, [2024-12-18T19:43:39.2281017Z] [42] [MqttClient] [Info]: Disconnected.
12. 12-18 14:43:44.542 | IOTCore Publisher Trace >> ClientID, [2024-12-18T19:43:44.5424334Z] [42] [MqttClient] [Verbose]: Connection with server established
Around 15 minutes is consistent across multiple times of testing this, are there any default timeouts around this time?
iotcore-debug.txt
The text was updated successfully, but these errors were encountered: