Zigbee2MQTT stops without reason, every couple of days

I’m running HAOS, (core 2024.1.6, supervisor 2023.12.1, os 11.4, frontend 20240104.0.
I use zigbee2mqtt, newest version (1.35.2-1) with a PoE coordinator (tube_zb_gw_cc2652p2_poe).
This is running within virtualbox on a dedicated Macmini, and has been for years without problem, and has been absolutely rock solid.
I have 44 zigbee devices.

A couple of weeks ago, there was no response from my zigbee devices, and I noticed zigbee2mqtt was not running. Restarting zigbee2mqtt did not work, it would go though the usual motions and then stop, without any errors in the log.
I tried restart mqtt, to no avail. The only way to bring it all back is to “Reboot System”, which works without fail.

Looking though the HA logs, the first entry before it begins to show all of the zigbee devices as being unavailable, is “Zigbee2MQTT Bridge Restart became unavailable”.

In the zigbee2mqtt logs, there is no log of it stopping, just creation of logs when it auto-starts back up, which it does 5 times before staying stopped.
Within those logs, everything looks normal (I can pastebin logs if required) with finally:

info  2024-02-03 06:20:59: Zigbee2MQTT started!

Then one or two messages like below at the end of this post before it stops.
I’m not so sure that the problem is with zigbee2mqtt, else why is it required that I reboot the whole HAOS to get it working again?

Any advice for troubleshooting further would be greatly appreciated.
Thanks.

debug 2024-02-03 06:21:00: Received MQTT message on 'homeassistant/sensor/0x000d6ffffe2e40ec/linkquality/config' with data '{"availability":[{"topic":"zigbee2mqtt/bridge/state"}],"device":{"identifiers":["zigbee2mqtt_0x000d6ffffe2e40ec"],"manufacturer":"IKEA","model":"TRADFRI control outlet (E1603/E1702/E1708)","name":"Lava Lamp","sw_version":"2.3.089","via_device":"zigbee2mqtt_bridge_0x00124b001ca1aff1"},"enabled_by_default":false,"entity_category":"diagnostic","icon":"mdi:signal","json_attributes_topic":"zigbee2mqtt/Lava Lamp","name":"Linkquality","object_id":"lava_lamp_linkquality","origin":{"name":"Zigbee2MQTT","sw":"1.35.2","url":"https://www.zigbee2mqtt.io"},"state_class":"measurement","state_topic":"zigbee2mqtt/Lava Lamp","unique_id":"0x000d6ffffe2e40ec_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
1 Like

I have the exact same issue, from the starting date to the frequency of the freezes.
The issue arose yesterday around 10:30, and I managed to grab logs of Zigbee2MQTT when I found out, and nothing really stands out:

[10:32:47] INFO: Preparing to start...
[10:32:49] INFO: Socat not enabled
[10:32:53] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:debug 2024-02-07 10:33:10: Loaded state from file /config/zigbee2mqtt/state.json
Zigbee2MQTT:info  2024-02-07 10:33:10: Logging to console and directory: '/config/zigbee2mqtt/log/2024-02-07.10-33-09' filename: log.txt
Zigbee2MQTT:debug 2024-02-07 10:33:10: Removing old log directory '/config/zigbee2mqtt/log/2024-02-07.09-42-02'
Zigbee2MQTT:info  2024-02-07 10:33:10: Starting Zigbee2MQTT version 1.35.2 (commit #unknown)
Zigbee2MQTT:info  2024-02-07 10:33:10: Starting zigbee-herdsman (0.33.5)
Zigbee2MQTT:debug 2024-02-07 10:33:10: Using zigbee-herdsman with settings: '{"adapter":{"concurrent":null,"delay":null,"disableLED":false},"backupPath":"/config/zigbee2mqtt/coordinator_backup.json","databaseBackupPath":"/config/zigbee2mqtt/database.db.backup","databasePath":"/config/zigbee2mqtt/database.db","network":{"channelList":[11],"extendedPanID":[221,221,221,221,221,221,221,221],"networkKey":"HIDDEN","panID":6754},"serialPort":{"adapter":"ezsp","path":"/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230220184348-if00"}}'

How can I help with this as well?

I’m running Home Assistant on a Raspberry Pi 4, with a Sonoff Zigbee USB dongle. Versions are:

  • Core: 2024.1.6
  • Supervisor: 2024.01.1
  • Operating System: 11.4
  • Frontend: 20240104.0
  • Zigbee2MQTT: 1.35.3-1

Thanks.

I have the same problem. It is a new problem and since I have been running both Zigbee2MQTT and Bluetooth for a long time I would be surprised if the was Bluetooth related. I can’t find any info in the logs and it can take several goes to get it to restart. It will not auto restart on boot even although I have this option checked. The problem seemed to have started when I recently updated the Zigbee2Mqtt integration although this may just be a co-incidence. I am fully up to date with my Homeassistant and run it on Proxmox.

Okie dokie I resolved my issue.
A recent update must have changed something (as they do), which caused my virtual machine to use more memory. Memory usage was occasionally over 1gb, which caused HA to stop addons to conserve memory usage, the addons would then attempt to restart, sometimes successfully and sometimes not.
This is why we have nothing in the logs, as zigbee2mqtt was simply abruptly terminated.
I increased memory available to the VM to 2gb and like magic everything has returned to being perfect.
I’m hoping it’s the same issue for you guys.

1 Like

I’ll try and update to the very latest version, but the issue occurred once more yesterday night around 10pm. Nothing in the logs; but I’ll try and monitor the RAM usage, it may be worth to check.

It happened again, today around 10:20 am. I had updated everything to their latest versions, and also monitored the RAM usage.
Here it is:


You can clearly see when Z2M was stopped. Since then, impossible to restart it, as usual, and I’ll have to restart the whole HA system. Otherwise, Z2M can’t be started: the logs show the usual startup sequence, without any other information. I’ll try to increase the log level to DEBUG, in case something is missing somewhere (but I doubt it).

It’s bothering me SO MUCH that I’m currently migrating the whole Z2M (and the MQTT broker) to another device, more powerful than my RPi.

Yep, that is exactly what was happening to me. The difference is I could simply give the virtual machine more ram, I guess you can’t, aside from upgrading your pi to one with more ram.
Is there any other addons you have which you could stop? Like node red or such?

A little update on the issue. It happened again, like 3-4 days after the previous crash.
So I removed my Z2M integration from HA, and moved it & the MQTT broker to a separate machine (a second Raspberry Pi). Since then, no issue at all. I’m a bit sad that I couldn’t pinpoint the issue exactly, but I’m happy with my new setup - the workload is nicely split between two machines now.

Nevertheless, thanks for the support guys :slight_smile:

Hi everybody
I’m facing same king of issue with Zigbee2MQTT the memory of the extention is constantly increasing up to 25%. After restart percentage is only few percents. Beside my HA running on a small thin client computer HPT630 with 8Go of RAM is also showing some memory increase up to 50% of global memory. After Zigbee2MQTT reboot memory usage drop back to 25%.
Any idea what to do. this issue bother me since a while. I already have reinstalled Z2M but I have not move the broker elswhere.
Expecting to have some shared experience.