I’ve been fighting a major recent problem I’ve been having with HA that results in “too many open files” errors on a MASSIVE scale… Still working to figure it out, but this seems relevant…
Here’s a graph of “sudo lsof | wc -l” and “sudo -u homeassistant | wc -l” :
The large cliffs are restarts of HA. Is anyone else experiencing this with either of these components? It makes using HA almost impossible without frequent restarts.
Both of these components were not having this issue in their previous incarnation… Chasing up the Lifx one first… Will see about the Unifi component next.
So other people are happy to tolerate a home automation system that can only run for a maximum of about 20 hours at a time? Nobody else is bothered? Or affected?
I hadn’t noticed any errors from this, but I ran across this thread and was curious myself
Looking at the open files, I visually noticed that a lot of them were TCP connections to Chromecast devices. They all have chrome in the hostname so I was able to filter them out.
If you use the lifx component, download the latest version, rename it as lifxtest.py custom component in the appropriate directory (i.e. .homeassistant/custom_components/light/lifxtest.py) and then add:
light:
- platform: lifxtest
to your configuration.yaml
This not only fixed the lifx component for me, but also fixed the totally unrelated Unifi device tracker which was leaking files twice as badly. don’t ask me why as I have NO idea.