Skip to content

Instantly share code, notes, and snippets.

@dragolabs
Forked from devinrhode2/README.md
Created May 24, 2018 09:46

Revisions

  1. @devinrhode2 devinrhode2 revised this gist Dec 28, 2017. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions load.sh
    Original file line number Diff line number Diff line change
    @@ -7,8 +7,7 @@

    # sudo mv limit.maxfiles.plist /Library/LaunchDaemons
    # or
    sudo touch /Library/LaunchDaemons/limit.maxfiles.plist
    sudo code /Library/LaunchDaemons/limit.maxfiles.plist
    sudo vim /Library/LaunchDaemons/limit.maxfiles.plist
    # paste in the code

    sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist
  2. @devinrhode2 devinrhode2 revised this gist Dec 22, 2017. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -92,4 +92,6 @@ I would presume this might be the kernels max capacity (probably guesstimated by

    The gist this was forked from set the macproc to 2048 which is lower than my current default 10240, so I'm not going to modify that for now.

    My default max limit is acually `unlimited` right now when I run `launchctl limit maxfiles` but I'm going to err on the side of sticking to the instructions provided from basho.
    My default max limit is acually `unlimited` right now when I run `launchctl limit maxfiles` but I'm going to err on the side of sticking to the instructions provided from basho.

    If you get this error `ulimit: setrlimit failed: invalid argument` when trying to run `ulimit - n 12288` in your shell/bash_profile?bashrc/zshrc, you need to include the second paramter for the hard limit, so I did `ulimit -n 10240 12288` and this worked for me
  3. @devinrhode2 devinrhode2 revised this gist Dec 22, 2017. 4 changed files with 23 additions and 29 deletions.
    15 changes: 15 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -78,3 +78,18 @@ ulimit -u 2048

    Like the plist files, your bashrc or similar file should have -rw-r--r-- permissions. At this point, you can restart your computer and enter `ulimit -n` into your terminal. If your system is configured correctly, you should see that maxfiles has been set to 200000.




    How I modified limits for my 2013 Macbook air (running sierra): run `sysctl -a | grep kern.maxfiles` this may show you:
    ```
    kern.maxfiles: 12288
    kern.maxfilesperproc: 10240
    ```
    I would presume this might be the kernels max capacity (probably guesstimated by apple, but still, I have to respect apple's settings). This seems like a fair max limit given my minimal research on this issue. For a soft limit, I think subtracting 2048 seems fair also. I'm no expert on this stuff, but maybe it sounds reasonable to you too.

    12288-2048=10240 (soft limit) (Oh hey what do you know - this is the same number as the `kern.maxfilesperproc`).

    The gist this was forked from set the macproc to 2048 which is lower than my current default 10240, so I'm not going to modify that for now.

    My default max limit is acually `unlimited` right now when I run `launchctl limit maxfiles` but I'm going to err on the side of sticking to the instructions provided from basho.
    4 changes: 2 additions & 2 deletions limit.maxfiles.plist
    Original file line number Diff line number Diff line change
    @@ -9,8 +9,8 @@
    <string>launchctl</string>
    <string>limit</string>
    <string>maxfiles</string>
    <string>524288</string>
    <string>524288</string>
    <string>10240</string>
    <string>12288</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    20 changes: 0 additions & 20 deletions limit.maxproc.plist
    Original file line number Diff line number Diff line change
    @@ -1,20 +0,0 @@
    <?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.maxproc</string>
    <key>ProgramArguments</key>
    <array>
    <string>launchctl</string>
    <string>limit</string>
    <string>maxproc</string>
    <string>2048</string>
    <string>2048</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>ServiceIPC</key>
    <false/>
    </dict>
    </plist>
    13 changes: 6 additions & 7 deletions load.sh
    Original file line number Diff line number Diff line change
    @@ -2,16 +2,15 @@

    # These are the original gist links, linking to my gists now.
    # curl -O https://gist.githubusercontent.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxfiles.plist
    # curl -O https://gist.githubusercontent.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxproc.plist

    curl -O https://gist.githubusercontent.com/tombigel/d503800a282fcadbee14b537735d202c/raw/ed73cacf82906fdde59976a0c8248cce8b44f906/limit.maxfiles.plist
    curl -O https://gist.githubusercontent.com/tombigel/d503800a282fcadbee14b537735d202c/raw/ed73cacf82906fdde59976a0c8248cce8b44f906/limit.maxproc.plist
    # curl -O https://gist.githubusercontent.com/tombigel/d503800a282fcadbee14b537735d202c/raw/ed73cacf82906fdde59976a0c8248cce8b44f906/limit.maxfiles.plist

    sudo mv limit.maxfiles.plist /Library/LaunchDaemons
    sudo mv limit.maxproc.plist /Library/LaunchDaemons
    # sudo mv limit.maxfiles.plist /Library/LaunchDaemons
    # or
    sudo touch /Library/LaunchDaemons/limit.maxfiles.plist
    sudo code /Library/LaunchDaemons/limit.maxfiles.plist
    # paste in the code

    sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist
    sudo chown root:wheel /Library/LaunchDaemons/limit.maxproc.plist

    sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist
    sudo launchctl load -w /Library/LaunchDaemons/limit.maxproc.plist
  4. @tombigel tombigel revised this gist Sep 7, 2017. No changes.
  5. @tombigel tombigel revised this gist Sep 7, 2017. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,7 @@ The last two columns are the soft and hard limits, respectively.

    ### Adjusting Open File Limits in Yosemite

    To adjust open files limits on a system-wide basis in Mac OS X Yosemite, you must create two configuration files. The first is a property list (aka plist) file in /Library/LaunchDaemons/limit.maxfiles.plist that contains the following XML configuration:
    To adjust open files limits on a system-wide basis in Mac OS X Yosemite, you must create two configuration files. The first is a property list (aka plist) file in `/Library/LaunchDaemons/limit.maxfiles.plist` that contains the following XML configuration:

    ```xml
    <?xml version="1.0" encoding="UTF-8"?>
    @@ -42,7 +42,7 @@ To adjust open files limits on a system-wide basis in Mac OS X Yosemite, you mus
    </plist>
    ```

    This will set the open files limit to 200000. The second plist configuration file should be stored in /Library/LaunchDaemons/limit.maxproc.plist with the following contents:
    This will set the open files limit to 200000. The second plist configuration file should be stored in `/Library/LaunchDaemons/limit.maxproc.plist` with the following contents:

    ```xml
    <?xml version="1.0" encoding="UTF-8"?>
    @@ -76,5 +76,5 @@ ulimit -n 200000
    ulimit -u 2048
    ```

    Like the plist files, your bashrc or similar file should have -rw-r--r-- permissions. At this point, you can restart your computer and enter ulimit -n into your terminal. If your system is configured correctly, you should see that maxfiles has been set to 200000.
    Like the plist files, your bashrc or similar file should have -rw-r--r-- permissions. At this point, you can restart your computer and enter `ulimit -n` into your terminal. If your system is configured correctly, you should see that maxfiles has been set to 200000.

  6. @tombigel tombigel revised this gist Sep 7, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    # How to Change Open Files Limit on OS X and macOS

    _This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x
    _This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x_

    The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine
    _The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine
    https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/_

    ## Mac OS X
  7. @tombigel tombigel revised this gist Sep 7, 2017. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,8 @@
    # How to Change Open Files Limit on OS X and macOS

    _This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x
    The last time i checked this link was dead (403) so I cloned it here from latest snapshot I could find in Archive.org's Wayback Machine

    The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine
    https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/_

    ## Mac OS X
  8. @tombigel tombigel revised this gist Sep 7, 2017. 1 changed file with 6 additions and 2 deletions.
    8 changes: 6 additions & 2 deletions load.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,11 @@
    #!/bin/sh

    curl -O https://gist.githubusercontent.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxfiles.plist
    curl -O https://gist.githubusercontent.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxproc.plist
    # These are the original gist links, linking to my gists now.
    # curl -O https://gist.githubusercontent.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxfiles.plist
    # curl -O https://gist.githubusercontent.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxproc.plist

    curl -O https://gist.githubusercontent.com/tombigel/d503800a282fcadbee14b537735d202c/raw/ed73cacf82906fdde59976a0c8248cce8b44f906/limit.maxfiles.plist
    curl -O https://gist.githubusercontent.com/tombigel/d503800a282fcadbee14b537735d202c/raw/ed73cacf82906fdde59976a0c8248cce8b44f906/limit.maxproc.plist

    sudo mv limit.maxfiles.plist /Library/LaunchDaemons
    sudo mv limit.maxproc.plist /Library/LaunchDaemons
  9. @tombigel tombigel revised this gist Sep 7, 2017. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    ### Open Files Limit
    # How to Change Open Files Limit on OS X and macOS

    This text is the section about latest OS X Yosemite which also works for macOS Sierra from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x
    The last time i checked this link was dead (403) so I cloned it here from last snapshot I could find in Archive.org's Wayback Machine
    https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/
    _This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x
    The last time i checked this link was dead (403) so I cloned it here from latest snapshot I could find in Archive.org's Wayback Machine
    https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/_

    ## Mac OS X

  10. @tombigel tombigel revised this gist Sep 7, 2017. 1 changed file with 11 additions and 7 deletions.
    18 changes: 11 additions & 7 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,14 @@
    # Mac OS X
    This text is originally from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x
    but the last time i checked this link was dead (403).
    ### Open Files Limit

    This text is the section about latest OS X Yosemite which also works for macOS Sierra from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x
    The last time i checked this link was dead (403) so I cloned it here from last snapshot I could find in Archive.org's Wayback Machine
    https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

    ## Mac OS X

    ### To check the current limits on your Mac OS X system, run:

    ```
    ```shell
    launchctl limit maxfiles
    ```

    @@ -14,7 +18,7 @@ The last two columns are the soft and hard limits, respectively.

    To adjust open files limits on a system-wide basis in Mac OS X Yosemite, you must create two configuration files. The first is a property list (aka plist) file in /Library/LaunchDaemons/limit.maxfiles.plist that contains the following XML configuration:

    ```
    ```xml
    <?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">
    @@ -39,7 +43,7 @@ To adjust open files limits on a system-wide basis in Mac OS X Yosemite, you mus

    This will set the open files limit to 200000. The second plist configuration file should be stored in /Library/LaunchDaemons/limit.maxproc.plist with the following contents:

    ```
    ```xml
    <?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">
    @@ -66,7 +70,7 @@ Both plist files must be owned by root:wheel and have permissions -rw-r--r--. Th

    In addition to setting these limits at the system level, we recommend setting the at the session level as well by appending the following lines to your bashrc, bashprofile, or analogous file:

    ```
    ```shell
    ulimit -n 200000
    ulimit -u 2048
    ```
  11. @tombigel tombigel revised this gist Sep 7, 2017. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,16 @@
    #Mac OS X
    # Mac OS X
    This text is originally from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x
    but the last time i checked this link was dead (403).

    ###To check the current limits on your Mac OS X system, run:
    ### To check the current limits on your Mac OS X system, run:

    ```
    launchctl limit maxfiles
    ```

    The last two columns are the soft and hard limits, respectively.

    ###Adjusting Open File Limits in Yosemite
    ### Adjusting Open File Limits in Yosemite

    To adjust open files limits on a system-wide basis in Mac OS X Yosemite, you must create two configuration files. The first is a property list (aka plist) file in /Library/LaunchDaemons/limit.maxfiles.plist that contains the following XML configuration:

  12. @tombigel tombigel revised this gist Sep 7, 2017. 1 changed file with 73 additions and 0 deletions.
    73 changes: 73 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,73 @@
    #Mac OS X

    ###To check the current limits on your Mac OS X system, run:

    ```
    launchctl limit maxfiles
    ```

    The last two columns are the soft and hard limits, respectively.

    ###Adjusting Open File Limits in Yosemite

    To adjust open files limits on a system-wide basis in Mac OS X Yosemite, you must create two configuration files. The first is a property list (aka plist) file in /Library/LaunchDaemons/limit.maxfiles.plist that contains the following XML configuration:

    ```
    <?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>200000</string>
    <string>200000</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>ServiceIPC</key>
    <false/>
    </dict>
    </plist>
    ```

    This will set the open files limit to 200000. The second plist configuration file should be stored in /Library/LaunchDaemons/limit.maxproc.plist with the following contents:

    ```
    <?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.maxproc</string>
    <key>ProgramArguments</key>
    <array>
    <string>launchctl</string>
    <string>limit</string>
    <string>maxproc</string>
    <string>2048</string>
    <string>2048</string>
    </array>
    <key>RunAtLoad</key>
    <true />
    <key>ServiceIPC</key>
    <false />
    </dict>
    </plist>
    ```

    Both plist files must be owned by root:wheel and have permissions -rw-r--r--. This permissions should be in place by default, but you can ensure that they are in place by running sudo chmod 644 <filename>. While the steps explained above will cause system-wide open file limits to be correctly set upon restart, you can apply them manually by running launchctl limit.

    In addition to setting these limits at the system level, we recommend setting the at the session level as well by appending the following lines to your bashrc, bashprofile, or analogous file:

    ```
    ulimit -n 200000
    ulimit -u 2048
    ```

    Like the plist files, your bashrc or similar file should have -rw-r--r-- permissions. At this point, you can restart your computer and enter ulimit -n into your terminal. If your system is configured correctly, you should see that maxfiles has been set to 200000.

  13. @a2ikm a2ikm revised this gist Nov 28, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions load.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/sh

    curl -O https://gist.github.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxfiles.plist
    curl -O https://gist.github.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxfiles.plist
    curl -O https://gist.githubusercontent.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxfiles.plist
    curl -O https://gist.githubusercontent.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxproc.plist

    sudo mv limit.maxfiles.plist /Library/LaunchDaemons
    sudo mv limit.maxproc.plist /Library/LaunchDaemons
  14. @a2ikm a2ikm revised this gist Nov 8, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions load.sh
    Original file line number Diff line number Diff line change
    @@ -6,8 +6,8 @@ curl -O https://gist.github.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644
    sudo mv limit.maxfiles.plist /Library/LaunchDaemons
    sudo mv limit.maxproc.plist /Library/LaunchDaemons

    sudo chmod root:wheel /Library/LaunchDaemons/limit.maxfiles.plist
    sudo chmod root:wheel /Library/LaunchDaemons/limit.maxproc.plist
    sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist
    sudo chown root:wheel /Library/LaunchDaemons/limit.maxproc.plist

    sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist
    sudo launchctl load -w /Library/LaunchDaemons/limit.maxproc.plist
  15. @a2ikm a2ikm revised this gist Nov 8, 2016. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions load.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,13 @@
    #!/bin/sh

    curl -O https://gist.github.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxfiles.plist
    curl -O https://gist.github.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxfiles.plist

    sudo mv limit.maxfiles.plist /Library/LaunchDaemons
    sudo mv limit.maxproc.plist /Library/LaunchDaemons

    sudo chmod root:wheel /Library/LaunchDaemons/limit.maxfiles.plist
    sudo chmod root:wheel /Library/LaunchDaemons/limit.maxproc.plist

    sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist
    sudo launchctl load -w /Library/LaunchDaemons/limit.maxproc.plist
  16. @a2ikm a2ikm created this gist Nov 8, 2016.
    20 changes: 20 additions & 0 deletions limit.maxfiles.plist
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    <?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>524288</string>
    <string>524288</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>ServiceIPC</key>
    <false/>
    </dict>
    </plist>
    20 changes: 20 additions & 0 deletions limit.maxproc.plist
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    <?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.maxproc</string>
    <key>ProgramArguments</key>
    <array>
    <string>launchctl</string>
    <string>limit</string>
    <string>maxproc</string>
    <string>2048</string>
    <string>2048</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>ServiceIPC</key>
    <false/>
    </dict>
    </plist>
    7 changes: 7 additions & 0 deletions load.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    #!/bin/sh

    sudo mv limit.maxfiles.plist /Library/LaunchDaemons
    sudo mv limit.maxproc.plist /Library/LaunchDaemons

    sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist
    sudo launchctl load -w /Library/LaunchDaemons/limit.maxproc.plist