Question: Too many open files error on Mac OS: ulimit -n 10240 works, higher n values don't
A simple fix for the "too many files open" limitation of Mac OS is to use the "ulimit - n" command. Curiously, the value of n appears to be critical to whether or not this command is accepted by MacOS.
I've found that ulimit -n 10240 (the default is 256) works but n values higher do not. 10240 files is probably more that enough for most users.
This is a much simpler fix than many others I've found via Google. Does anyone know whether 10240 is the actual limit, and, if so, why? I also wonder whether the complex alternatives solutions to ulimit were developed because the user simply chose a value that wasn't accepted by MacOS and gave up on ulimit thinking it was a Linux command that doesn't work on MacOS.
Adding the "ulimit -n 10240" statement to your bash profile using sudo nano .bash_profile makes it permanent.