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've been having a persistent "too many open files in system" error on my machine (OSX 10.7.5).

When I run sysctl kern.maxfiles and sysctl kern.maxfilesperproc, both output 2048.

This article says those settings default to 12,288 and 10,240, respectively. It says you can permanently change the settings by editing /etc/sysctl.conf.

I've done that. The contents of that file are now:


The permissions on it are -rw-r--r--, and it belongs to root in the wheel group.

This file has no effect on what my system is doing. After restart, if I check the maxfile settings, they are unchanged.

Is there something else controlling these settings, making my defaults lower than what they should be and overriding my explicit settings?

How can I fix these settings?


I've since tried, to no avail:

Lower Limits

Setting them to 4000 and 3500 in case the system ignores settings over a certain threshold.

Using /etc/rc.common

I put the following, not in /etc/sysctl.conf, but in /ect/rc.common:

sysctl -w kern.maxfiles=4000
sysctl -w kern.maxfilesperproc=3500

Using my shell's configuration file

I put the same commands as above in my .zshrc, but they don't work without sudo.

share|improve this question

See /etc/launchd.conf

For some reason, I had this in /etc/launchd.conf:

limit maxfiles 2048

This apparently overrode my settings in /etc/sysctl.conf, either by being considered more important or by being executed later in the bootup process.

After I removed this and rebooted, my settings from /etc/sysctl.conf had taken effect.

share|improve this answer

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.