Last active
October 20, 2022 21:34
-
-
Save nweddle/bd949e3a306736ac53f42a8a01c97f3d to your computer and use it in GitHub Desktop.
Increase maxfiles limit on macOS Monterey 12.6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>limit.maxfiles</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>launchctl</string> | |
<string>limit</string> | |
<string>maxfiles</string> | |
<string>32767</string> | |
<string>9223372036854775807</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true /> | |
<key>ServiceIPC</key> | |
<false /> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
References
https://apple.stackexchange.com/a/366319
https://gist.github.com/tombigel/d503800a282fcadbee14b537735d202c
32767 = maximum value for a signed 16-bit integer. Selected as a sane default. YMMV.
9223372036854775807 = maximum value for a signed 64-bit integer. Results in hard limit being set correctly to default of
unlimited
.Check current limit values
launchctl limit maxfiles ulimit -n
Default values for macOS Monterey 12.6 are
maxfiles 256 unlimited
Steps to apply higher limit values
In some cases a machine restart may be required for above to take effect.