-
Notifications
You must be signed in to change notification settings - Fork 819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request]: Do not retain MQTT 'stat' topic #4160
Comments
Did you confirm this really solves your memory problem? The official MQTT server is very active. Depending on your hardware, I'm not surprised you will be running out of memory if you bridge it. You could try if changing |
Not yet. I have disconnected my MQTT bridge for now. I realized that if I delete all 'retained' messages via my two way bridge this would be propagated to the main MQTT server and that would not be so nice I guess. What I wonder. This issue first appeared maybe a month or two ago. Then I disconnected my bridge, cleaned out the whole msh tree, re-connected and it was fine again. On 17. June, the issue was back. My MQTT broker runs on a small arm64 board. What could be related is this error being logged every couple of seconds when I connect the bridge:
I'm not sure if my mosquitto instance is disconnecting because it receives a malformed packet from the meshtastic mqtt broker, or if the mestastic broker is disconnecting me. |
I guess the bridge is receiving a malformed packet from mqtt.meshtastic.org and when publishing this to my local mosquitto it is being disconnected, repeating with each re-connection to mqtt.meshtastic.org when all retained messages are received and re-published. |
It is indeed the PUBLISH to the topic right before the disconnect which causes the issue. Mostly they start with paho... After reconnecting, it disconnects on the same paho... topic again. When I then go on and delete that retained message on mqtt.meshtastic.org the disconnect happens on the next such paho... message. |
Now it's weird...
This is getting me the topic which causes the disconnect. If i then do a mosquitto_pub to mqtt.meshtastic.org with -r -n to delete that topic I see the next one. So I attempted to replicate and before deleting the topic, I did a mosquitto_sub on it to then pass it on to my local broker with mosquitto_pub. For sure not the same as when the broker does the same in bridge mode. But even when looking at the connection with wireshark, I don't see anything obvious. I had a glimpse at the connecting from my bridge to mqtt.mosquitto.org but it looks like if I subscribe to msh/# I get all retained messages in one go. |
eclipse/mosquitto#3073 indicates it's an issue with the mosquitto broker bridge and high volume traffic. |
Stat topic removed |
Platform
other
Description
I have been investigating once more, why my mosquitto MQTT broker, to which I connect my nodes and which I bridge to the official mqtt server, is periodically running out of memory.
It looks like the stat topic has retained flag set. So they accumulate over time. Not sure why this is done this way. Would it be possible to turn that off to save memory on mqtt brokers?
-Benoît-
The text was updated successfully, but these errors were encountered: