Mosquitto broker restarts every few minutes

I, too, am seeing the same issue on RPi - Mosquitto crashing repeatedly with potential memory leak?

Also on an RPi3 with 1GB RAM. It’s worked flawlessly for several years but Mosquitto crashes have been a growing issue in recent months.

It’s easy to suggest throwing more RAM at the problem, but the add-on is only using 3% of the available RAM. Total RAM usage peaks around 85%.

RAM usage climbs slowly and resets every time Mosquitto crashes and restarts…

So maybe it’s time to look for a memory leak in Mosquitto?

Memory Leak Vulnerability in Mosquitto · Issue #3363 · eclipse-mosquitto/mosquitto

Not if you are running HA on a RPI 3 with 1GB of ram it isn’t.

Exactly. This will catch a lot of RPi3 users out as the hardware requirements have quietly increased.

Technology tends to evolve. I miss my 56k dial up modem too

@glitter-ball - what are you using mosquitto for? in my case it was the integration layer for Tasmota and Openbkn devices. i migrated all of them the ESPHome and stopped the broker.

I have two incoming MQTT streams - one from my gas and electricity smart meters and a second from the interface to my gas boiler, which also provides water metering. They both only provide MQTT and no option to host the broker, so it’s staying on the HA hardware.

The errors have stopped since I enabled 2GB swap (20% reduction in RAM usage) but I’ve got an RPi5 on the way for a permanent fix.