-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Increase the number of files a node may have open at a time
- Loading branch information
Showing
6 changed files
with
25 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Adjust the maximum number of files that may be opened to as large as possible. | ||
# | ||
|
||
maxOpenFds=65000 | ||
if [[ $(uname) = Darwin ]]; then | ||
maxOpenFds=24576 # Appears to be the max permitted on macOS... | ||
fi | ||
|
||
if [[ $(ulimit -n) -lt $maxOpenFds ]]; then | ||
ulimit -n $maxOpenFds || { | ||
echo "Error: nofiles too small: $(ulimit -n). Run \"ulimit -n $maxOpenFds\" to continue"; | ||
exit 1 | ||
} | ||
fi | ||
|