Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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?

share|improve this question
up vote 3 down vote accepted talks about this issue in great detail.

When you do sudo launchctl limit maxproc, you're viewing or changing the system-wide launchd limits.

When you do launchctl limit maxproc, you're viewing or changing the launchd limits for your user.

One thing to keep in mind is this:

The root user can increase the hard limits of the system-wide launchd, without a reboot. However, you cannot change a user’s launchd hard limits without a reboot (even if trying to do so as the root user).

Basically, the hard limit (the right hand column) that is displayed when you initially do launchctl limit maxproc will be the limit that you can set using ulimit -u without rebooting. Logging out and back in will not work. Even if you change whats displayed by launchctl limit maxproc, the initial hard limit remains. See this answer for a bit more info on the relationship between ulimit and launchctl limit. To raise that limit, you have to

  • edit/create /etc/sysctl.conf to raise the maximum processes supported by the kernel

  • edit/create /etc/launchd.conf to raise the hard limits of the system-wide launchd at boot time

    limit maxproc 2500 2500
  • reboot

Also note that 2500 seems to be the maximum limit that kern.maxproc can be set to. I'll ask a question about this as soon as I reboot and have enough free processes to open another Chrome tab.

share|improve this answer
Note: The launchd.conf method no longer works in Mavericks and other newer distributions. – kenorb Jun 30 at 10:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.