I have a background job that failed due to too many open files
error.
To fix it, I have to kill the job, then run the following
sudo launchctl limit maxfiles 10240 10240
before restarting it.
Is there any way I can make the launchctl limit maxfiles
change permanent?
Best Answer
You can create a launch daemon to run that command on every startup. Create
/Library/LaunchDaemons/private.maxfiles.plist
with the following contents: