I can change all of the usual ulimits via (for instance)
ulimit -n 8192 and
launchctl limit maxfiles 8192 8192. Somehow, this doesn't seem to work for
-u, the maximum number of user processes:
~$ sudo launchctl limit maxproc 8192 8192 ~$ sudo launchctl limit maxproc maxproc 2048 2048 -- in a new terminal: ~$ ulimit -u 1064
I do get a "failed to fork" every once in a while, and it's quite annoying having to kill a bunch of processes when "kill" can't start :) (i.e. I usually resort to just rebooting the machine).
What's the correct way to change the maximum number of user processes?