Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 an only set lower values for the launchctl limit maxfiles.

I try launchctl limit maxfiles 2048 2048 and nothing changes:

$ launchctl limit maxfiles
maxfiles    500            500
$ launchctl limit maxfiles 2048 2048
$ launchctl limit maxfiles
maxfiles    500            500
$ launchctl limit maxfiles 1024 1024
$ launchctl limit maxfiles
maxfiles    500            500
$ launchctl limit maxfiles 499
$ launchctl limit maxfiles
maxfiles    499            499

I can only set a lower value. It does not work for higher values.

share|improve this question
1  
Have you looked at this? Could be a result of kernel limitations or various other resource changes you may need to do. There's a few answers there that may get you there. – nerdwaller May 31 '13 at 15:02
1  
This problem is still present in OS X 10.9.0. I submitted a bug report to Apple about it (bug report #15563096). One additional thing I observed is that rebooting seems to reset something, and the command works correctly again, but only once per boot. – Chad von Nau Dec 2 '13 at 6:06

You'll not have good luck trying to change this on the fly. Better is to find the launchd plist for the process you wish to affect and change the limits there. Kill the process and it will re-launch with the limits you wish as long as the system limits are not exceeded.

Here is a change log explaining exactly which lines in the xml document need to be changed for file limits. Also, be sure your limits are less than the system per process limit or launchd will ignore the plea for more files from the plist entirely.

 $ sysctl kern.maxfilesperproc
share|improve this answer

Your Answer

 
discard

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.