question

ssonder avatar image
ssonder asked

The MQTT on a Cerbo GX is disconnecting every 45-60 seconds for a few seconds

With a local MQTT client (node red) I connect to the MQTT server on the Venus OS of a Cerbo GX device. Appr. every 60 sec (varies between appr. 45-60 sec), node red shows that the connection to the MQTT is disconnected. After a few seconds (ip to 2-4 sec) the connection returns. I tried out cycling every 30 sec payload messages and without it. No difference. Firmware 3.21 large is running on the Cerbo GX device. Any idea what the reason could be that the MQTT server is disconnecting frequently?

MQTT
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

3 Answers
ssonder avatar image
ssonder answered ·

I did some further testing and noticed the following:
a) I have a grid meter emulated via https://github.com/mr-manuel/venus-os_dbus-mqtt-grid sending every second a value to Venus OS via MQTT
b) If I remove all other MQTT communication (and replaced it via Modbus TCP communication) except the one for a), the disconnection behavior disappeared.
Thus, I have the suspicion that the extension via a) is not working in parallel with other MQTT activities. Maybe anybody in this forum has an idea why I observed this situation.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

elvis avatar image
elvis answered ·

Just spit balling, but it sounds like the keepalive might be late and letting the session expire. Whats the interval on the keepalive?

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

ssonder avatar image
ssonder answered ·

After I exchanged all the MQTT connections with modbus except the dbus-mqtt-grid one, I once tested it again by reactivating the old set of MQTT calls again. Very strange, now the issue is not showing up again. I will monitor this now. But for the time being the issue is closed.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Related Resources