Last active
August 29, 2015 14:19
-
-
Save samchrisinger/e64b3b30fb433878a674 to your computer and use it in GitHub Desktop.
Script for fixing "Too many open files" with Mongodb
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
#!/bin/bash | |
sudo launchctl limit maxfiles 8096 8096 | |
sudo launchctl limit maxproc 8096 8096 | |
ulimit -n 8096 | |
ulimit -u 1024 |
Other useful commands for debugging:
ulimit -a
# Display ulimit settings for the current user
launchctl limit
# Display the limit settings for the system
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Put this script somewhere on your machine. I like to put my custom scripts in /opt/scripts/. Then
Then