Home Assistant turned everything off for no (identifiable) reason

Yesterday at around 21:00 Home Assistant suddenly turned everything it had access to off. This included many switches not included in the UI (other than for power monitoring) or in any automations. The logbook just shows lots of “turned off by service.homeassistant.turn_off” entries with no clue what initiated them. No clues in the system log. I have google home for a limited number of devices - nothing in its log for the time (or even day).

This is obviously rather concerning, and my partner wasn’t too impressed with being plunged into darkness and everything turned off in the room she was in!

I’m on a dedicated HA OS box, core-2021.4.4. Can anyone suggest any analysis I can do to try to work out why this happened?

That message about “client unable to keep up” is an odd one, comes from line 125 (currently) of this file. Suggests a lot of activity, and whatever was triggering it wasn’t dealing with the return traffic very well.

Were you interacting with HA via a device at the time? Is your system exposed to the internet?

Yes, I see what you mean; can you think of a way to get any more info on those connections? I don’t have ports open, internet access is via Nabu Casa.

Actually, those connections appears to be an issue which is addressed in the next release. ERROR: "Client unable to keep up with pending messages. Stayed over 512 for 5 seconds" at the system log · Issue #40443 · home-assistant/core · GitHub

No-one was using HA or interfacing at the time. My partner was just watching TV and I was playing an online (iPad) game.