Intermittent freezes on Raspberry Pi3 running Hassbian


It’s been a few days since I installed Hassbian on my raspberry pi 3 and I’ve been fiddling with configs for the most part. Ever since installing AppDaemon though I’ve been noticing random periods where the whole system goes completely unresponsive for 5-10 seconds when trying to edit config files via ssh, same happens in the web panels regularly, that is they regularly go completely unresponsive, seemingly at random.

Poking the problem I found this.

Whoa! That is a lot of python3 processes.

Reading the AppDaemon docs, and source, I found threads and threadpool_workers config entries and managed to get AppDaemon down to 4 processes total.

After this change the system seems a little more responsive but I still experience those extreme lag spikes on occasion.

I have and am running multiple raspberry pis in the home and none of them have have shown this behaviour, despite running much heavier loads.

My HomeAssistant also isn’t doing much, it’s frankly just a basic install that auto discovered my 4 Tradfri lightbulbs via the gateway, and that is it.

Has anyone experienced something similar on a raspberry pi running hassbian?

Also, is there a way to reduce the process count in homeassistant via the config? It was very easy to find the AppDaemon docs and source. All I’ve gathered from the homeassistant source is that the ThreadPoolWorker’s max_workers parameter get’s fed a None which in turn let’s it decide how many to spawn based on the core count of the CPU.

This got a bit longer than I planned, so if anything is unclear after this wall of text, don’t hesitate to ask! :slight_smile:


After reading this thread (Random freezes) this morning I decided to try revert my appdaemon thread reduction config entries and try and see if switching power supplies would make a difference.

Long story short, it didn’t. Not that I had high hopes as the brick this particular pi was running from before was 3.2A. Also, no under voltage logs in the journal.

I’ll continue poking this when I have more time, but for now it’s back to limiting threads and threadpool_workers for appdaemon.


If you are convinced this is an appdaemon problem, it would make sense to move this thread into the appdaemon section to get help there.


Currently I’m not sure about anything. What started out as a question on how to do the same thread and worker pool limiting in homeassistant like you can do in AppDaemon, and was therefore initially posted in Configuration but reading it the day after I saw it wasn’t really applicable and moved it to Installation->Hassbian since I saw alot of general hassbian related issues there.

This however has turned into a more general RPI3 performance investigation thing and should therefore perhaps be in uncategorized.

If people feel more comfortable having this in there, no problem I’ll move it asap.


It is just a matter of getting it to the attention of the people who may be able to help. I doubt anyone reads the entire forum these days.