You can change it as follows:
$ launchctl limit maxfiles
maxfiles 256 unlimited
$ sysctl kern.maxfiles
kern.maxfiles: 12288
$ sudo vi /Library/LaunchDaemons/limit.maxfiles.plist
<?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>65535</string>
<string>65535</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceIPC</key>
<false/>
</dict>
</plist>
$ launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist
$ launchctl limit maxfiles
maxfiles 256 unlimited
$ sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist
$ launchctl limit maxfiles
maxfiles 65535 65535
$ sysctl kern.maxfiles
kern.maxfiles: 65535
$
Note loading the configuration without "sudo" didn't work.
Reference:
https://blog.dekstroza.io/ulimit-shenanigans-on-osx-el-capitan/
No comments:
Post a Comment