48

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.

Olli
  • 7,739

4 Answers4

52

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:

http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/launchctl.1.html

9

There's an answer on StackOverflow for this one. Apparently ulimit does it now.

atl
  • 101
4

As @snowe2010 said in a comment, the correct command for Sierra+ would be:

launchctl limit maxfiles 2048 unlimited

hernvnc
  • 141
1

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.