Become The Solution Chicago Logo

Increase Open File Descriptor Limits – (Fix Too Many Open Files Errors) Mac OS X 10.14

Increase Open File Descriptor Limits – (Fix Too Many Open Files Errors) Mac OS X 10.14

Mac OS X limits the amount of open files (file descriptors) by default to 256. This sometimes causes certain applications, such as Oracle MySQL and certain Java processes, to show errors like “too many open files”. You can check the current maximum open files limit in Terminal by typing the command below.


launchctl limit maxfiles


This likely outputs: maxfiles 256 (Mac OS X soft limit currently) and unlimited (Mac OS X hard limit currently set).


Mac os x file descriptor limit


Change Mac OS File Descriptor Limits Temporarily


sudo launchctl limit maxfiles 64000 524288


This will change the maximum open files to 64000 with a maximum hard limit of 524288. This will only take affect until you log out or reboot your Mac.



Change Mac OS File Descriptor Limits Permanently


  1. Create a plist file at /Library/LaunchDaemons/limit.maxfiles.plist with the following in it below. This file will automatically load after startup and set the max file limits per the Mac OS system.


The limits below are 64000 soft and 524288 hard in the config – feel free to change these. 

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
<plist version="1.0"> 

       2. In Terminal, change the owner of the file.


sudo chmod 600 /Library/LaunchDaemons/limit.maxfiles.plist

sudo chown root /Library/LaunchDaemons/limit.maxfiles.plist


  1. Load the plist file now and future startups.

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


  1. Test. Reboot your Mac then ensure the limits are set correctly by running the following command in Terminal.

launchctl limit maxfiles


Related Posts



No comments made yet. Be the first to submit a comment
Thursday, 21 January 2021

By accepting you will be accessing a service provided by a third-party external to

Sign-Up to Recieve E-Mail Updates!