Skip to content

Instantly share code, notes, and snippets.

@pylebecq
Last active August 29, 2015 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pylebecq/6f0f5305f669a1693f74 to your computer and use it in GitHub Desktop.
Save pylebecq/6f0f5305f669a1693f74 to your computer and use it in GitHub Desktop.
Augment maxfiles limit on OS X

How to augment maxfiles limit in OS X

  1. Create a plist file in /Library/LaunchDaemon (/Library/LaunchDaemons/limit.maxfiles.plist for example) with 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>65536</string>
        <string>65536</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>ServiceIPC</key>
    <false/>
</dict>
</plist>
  1. Restart your computer

  2. Use the command $ launchctl limit: the limit should be correctly set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment