MQTT client router locking up after about an hour

I set up MQTT on a client router configured device (T beam, but the problem also exists with Heltec V3 units). It works fine, acesible via Wifi and bringing in traffic from Long Fast channel 20 from all over the country – for an hour or so. Then it becomes unreachable via wifi and the outside traffic stops and the nodes found drop back from 50 or more to just my local three. It still shows as active on my local node and I can still send direct messages to it and it responds to traceroute.

The only way I have found to fix it is by turning off the device.

I suspect a configuration problem. Power saving is set to off. I’m not sure what else to look at.

Suggestions?

Edit: I suspect it’s the wifi connection that is getting broken.

I was running into this as well. I ended up turning off mqtt on longfast and it fixed the problem, I’m still up/downlinking my other channels. I am going to try moving longfast to a secondary channel, enabling up/downlink and seeing if that still causes the lockup.

I have LongFast on a secondary channel with MQTT enabled. Primary and secondary doesn’t seem to matter.

Edit: but my router has problems too. I’m getting a new one next week and will experiment more then.

1 Like

I’ve been having the same problem.

Seems like the NodeDB fills up and locks up the node. About the only work around - Reset/Power Cycle the node. Then go into the nodes config and Reset NodeDB. This will fix the problem for a while, but it will lock up again. Just a matter of time.

I put a request on the github #3178 to fix this. Hopefully putting a TTL on the NodeDB will fix this issue.

2 Likes

Unfortunately your device will not keep up with the amount of traffic on the public MQTT server and default LongFast channel, this is documented: MQTT Module Configuration | Meshtastic
You could try a different channel name than LongFast.

Since there are more nodes on LongFast than fit in your NodeDB, a TTL will not work. Already now when it’s full the oldest gets removed, but it will remain full.

1 Like

So this is an accepted system limitation right now?

MQTT topics are now already separated by region (from firmware 2.2.19 on, but you have to unset and reset your region for it to take into effect). Furthermore, from that firmware onwards, packets coming from MQTT will not be rebroadcasted back into MQTT anymore.

But you cannot control what all people around the world are setting for telemetry, position and node info update intervals. So if there’s just too much traffic that those devices cannot handle, what else can be done?

What are the regions? I’m on msh/US but it reaches 100 nodes in minutes.

Maybe it would be a good practice to turn off the LongFast channel upload/download when not actually trying to communicate?