Couldn't watch /home/computer/app: Too many open files


I have an error when I run mix phx.server, the live reloading is not working because this error ? : Couldn't watch /home/computer/app: Too many open files

1 Like

Try something like ulimit -n 98304 and see if it helps.

1 Like

Hello, thank you for the response :slight_smile:

I get:

$ ulimit -n 98304
ksh: ulimit: -n exceeds allowable limit

Pretty obvious error message, have you tried decreasing the number until the command works?

The max is 1000 so I runned ulimit -n 999 but still the same error (Couldn’t watch /home/computer/app: Too many open files)

Did you run this command as root? And what operating system are you on?

No, just as normal user. I just tried as root it’s work with more than 1000 I put 9999 for try but the error remain [for the ulimit command]

I’m using OpenBSD

I don’t know OpenBSD, but after some googling, it seems that this is configured a bit differently. You might want to google for: "openbsd" too many open files and see what you need to configure to change the limits.

Well, you should not have put 99999 with root either. Try the number I gave you then start reducing it in increments of 1000 or such.

But yeah, definitely just look for how is this remedied in your OS. *BSDs and Linux do things a bit differently.