Mac OS X limits number of processes to 266 and open files to 256. Sometimes this is problem; 256 open files and 266 processes aren't that much.
How it's possible to change default ulimit values in Mac OS X 10.6.7?
(Hopefully there's no difference between 10.6.7 and other Snow Leopard releases.)
Related question in serverfault. Unfortunately, answer is for Mac OS X 10.5, and it's not working in 10.6.
14 Answers
launchctl has control over that now.
You can do a
launchctl limit maxfiles 2048 2048 to set the soft and hard limits for maximum files open. For more information see the 'limit' section of:
10There's an answer on StackOverflow for this one. Apparently ulimit does it now.
As @snowe2010 said in a comment, the correct command for Sierra+ would be:
launchctl limit maxfiles 2048 unlimited
FYI.
.bash_profile update didn't help me for OS v10.10.3, but reinstallation NodeJS from 0.10.35 to 0.12.3 helped me, and error disappear.