Created
March 19, 2019 16:29
-
-
Save bbugh/e7e8ed0c3ff158e22e733b2766666829 to your computer and use it in GitHub Desktop.
Find out what process is using the "Too many open files" issue on Mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# taken from this answer on stack exchange: https://superuser.com/a/1180084 | |
# This will show the number of files open by all of the processes | |
sudo lsof -n | cut -f1 -d' ' | uniq -c | sort | tail | |
# When you find out which one is using the most files, see what files are being used by it | |
sudo lsof -n | grep java | |
# In my case, it's always java because elasticsearch doesn't clean up after being on for weeks, I guess | |
brew services restart elasticsearch | |
# ta da, no more "out of files" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment