This is an old problem, but again, none of the old solutions work anymore.

Default ulimit is far too low and I need to increase it to basically unlimited (like let's say a million).

And I need to increase it globally. Not just in the shell, so .zshrc-based solutions won't work; notably they won't apply to docker.

Increasing it in launchctl doesn't seem to persist it (and does it even do anything?)

(and yes, I now there's a lot of existing answers to this - but they only work on older OSX; I don't know if there's any "close as no longer working" function)

  • 1
    There's no 'close as no longer working' button because older macOS versions are still used, so the solutions are still relevant. Jan 9 at 14:05

1 Answer 1


Here are working steps. It requires 4 restarts. Old methods do not work:

  • boot into recovery mode - shut down the computer, press power button and keep holding it until Options appear, select Options, Continue
  • open Terminal from menu and run: csrutil clear
  • restart and return to the recovery mode like before
  • open Terminal from menu and run: csrutil disable
  • restart again (nto normal mode
  • create /Library/LaunchDaemons/limit.maxfiles.plist, following insturctions from this post (contents also copied below)
  • restart again, you finally have correct maxfiles limit globally

Here's what should be in limit.maxfiles.plist:

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
<plist version="1.0"> 
  • Interestingly, the default value for sysctl kern.maxfiles in Ventura is 245760, and maxfilesperproc is 122880. Number of processes is 5333. That's up from the 256 files and 709 processes in Sierra, claimed by your linked article.
    – benwiggy
    Feb 8 at 17:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .