core: MQTT: "Timed out waiting for mid" never recovers leaves MQTT dead

The problem

On HA restart, gets “Timed out waiting for mid XXX” 170 times appears in log. Devices controlled via MQTT do not respond, do not have current state shown.

Environment

System Health

version: 2021.1.1 installation_type: Home Assistant OS dev: false hassio: true docker: true virtualenv: false python_version: 3.8.7 os_name: Linux os_version: 5.4.79-v7 arch: armv7l timezone: America/Los_Angeles

GitHub API: ok Github API Calls Remaining: 4685 Installed Version: 1.9.0 Stage: running Available Repositories: 713 Installed Repositories: 14

logged_in: true subscription_expiration: February 8, 2021, 4:00 PM relayer_connected: true remote_enabled: false remote_connected: false alexa_enabled: false google_enabled: true can_reach_cert_server: ok can_reach_cloud_auth: ok can_reach_cloud: ok

host_os: Home Assistant OS 5.10 update_channel: stable supervisor_version: 2020.12.7 docker_version: 19.03.13 disk_total: 57.8 GB disk_used: 6.5 GB healthy: true supported: true board: rpi3 supervisor_api: ok version_api: ok installed_addons: Samba share (9.3.0), Check Home Assistant configuration (3.6.0), Mosquitto broker (5.1), Terminal & SSH (8.10.0)

dashboards: 1 mode: storage views: 10 resources: 11

  • Home Assistant Core release with the issue:
  • Last working Home Assistant Core release (if known):
  • Operating environment (OS/Container/Supervised/Core):
  • Integration causing this issue:
  • Link to integration documentation on our website:

Problem-relevant configuration.yaml


Traceback/Error logs

2021-01-10 18:56:24 ERROR (MainThread) [homeassistant.components.mqtt] Timed out waiting for mid 162

Additional information

zwavejs2mqtt is used, that runs on another host. Use of MQTT is new, no other services other than zwavejs use it so all activity is to that integration. Physically 30 devices to zwave. In normal runtime outside of restart, the HA RPi3+ has load < .2, on restart is jumps to .5 for a few minutes. I’ve looked at old issues with same error, doesn’t appear to be anything I can directly configure to increase timeouts? (e.g. https://github.com/home-assistant/core/issues/39847)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 26 (17 by maintainers)

Most upvoted comments

Same issue here using mosquito and Zigbee2mqtt

I’m not sure, I’d suggest to open an issue on https://github.com/home-assistant/addons/issues

The errors mean that Home Assistant didn’t get a reply from the MQTT server within 10s when attempting to subscribe to a topic or send a message.

This would be much more helpful as a message rather than “Timeout waiting for mid 4”.

Why close this issue? There are still users looking for solutions. The issue is not solved and zwavejs is not ready for prime time yet.

My logs show I have 3k occurrences.

Logger: homeassistant.components.mqtt
Source: components/mqtt/__init__.py:934
Integration: MQTT (documentation, issues)
First occurred: 11:39:46 AM (3031 occurrences)
Last logged: 11:47:44 AM

Timed out waiting for mid 6374
Timed out waiting for mid 6375
Timed out waiting for mid 6376
Timed out waiting for mid 6377
Timed out waiting for mid 6378

I’ve nuked the MQTT install with move to zwavejs websockets. Closing N/A.