Here is the step I followed
Step 1: Create new file
/Library/LaunchDaemons/limit.maxfiles.plist
Step 2: paste the following content
<?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>64000</string>
<string>524288</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceIPC</key>
<false/>
</dict>
</plist>
Step 3:
sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist
Step 4:
sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist
Runs into
Load failed: 5: Input/output error
I am using mac sonoma 14.3.1
Can someone tell what am I missing here?
sudo launchctl limit maxfiles 128000 524288
follow byulimit -n 524288 10485760
does not changeulimit
the file allowed is still 4096