Not enough system resources / too many files open with 33.3 upgrade

This used to happen to me after restarting HA too many times after a reboot. I would have to reboot to fix it.

Now, since 0.40, it happens after HA is running for a while. It’s completely broken my setup. It appears macOS just has an insanely low limit for this. We just need to increase the allowed number of files to be open.

You can see the list here:

$ ulimit -a
-t: cpu time (seconds) unlimited
-f: file size (blocks) unlimited
-d: data seg size (kbytes) unlimited
-s: stack size (kbytes) 8192
-c: core file size (blocks) 0
-v: address space (kbytes) unlimited
-l: locked-in-memory size (kbytes) unlimited
-u: processes 709
-n: file descriptors 256

after running:

ulimit -Sn 10000

it shows

-t: cpu time (seconds) unlimited
-f: file size (blocks) unlimited
-d: data seg size (kbytes) unlimited
-s: stack size (kbytes) 8192
-c: core file size (blocks) 0
-v: address space (kbytes) unlimited
-l: locked-in-memory size (kbytes) unlimited
-u: processes 709
-n: file descriptors 10000

But it doesn’t stick on a reboot. It goes back to 256.

Does anyone know the best practice for getting this to stick?

1 Like

https://blog.dekstroza.io/ulimit-shenanigans-on-osx-el-capitan/

I found this particular solution to be the cleanest and least invasive on your system.

Has anyone found a solution to this?

I’m finding HA has become totally unusable in the last few weeks due to this problem.

This post found that Web OS TV was leaking files, so if you have that it might be worth turning off

Had it, commented it out, still having issues.

How about these two

Exactly the same behavior today. Restart HA and Homebridge and everything fine. Perhaps it is something with the latest homebridge version?

A post was split to a new topic: Not enough system resources / too many files open with 0.69.0 upgrade