summaryrefslogtreecommitdiff
path: root/rpm
diff options
context:
space:
mode:
authorErnie Hershey <ernie.hershey@10gen.com>2013-11-06 18:25:39 -0500
committerErnie Hershey <ernie.hershey@10gen.com>2013-11-19 16:02:08 -0500
commit1b4c5d4f2c1ea6f25a035884adc7fea884c25334 (patch)
tree42a6ed9e533ecf62e69cc7768973fc6991ba6c3d /rpm
parenteb1f40c7ef0c53047eda306db5185350deeac8d3 (diff)
downloadmongo-1b4c5d4f2c1ea6f25a035884adc7fea884c25334.tar.gz
SERVER-10931 set ulimits in init scripts to match documentation
This sets resource limits across all Linux packages to match our recommended settings - http://docs.mongodb.org/manual/reference/ulimit/#recommended-settings
Diffstat (limited to 'rpm')
-rw-r--r--rpm/init.d-mongod12
1 files changed, 11 insertions, 1 deletions
diff --git a/rpm/init.d-mongod b/rpm/init.d-mongod
index ab69b19e993..2f3de17aa64 100644
--- a/rpm/init.d-mongod
+++ b/rpm/init.d-mongod
@@ -45,6 +45,16 @@ fi
start()
{
+ # Recommended ulimit values for mongod or mongos
+ # See http://docs.mongodb.org/manual/reference/ulimit/#recommended-settings
+ #
+ ulimit -f unlimited
+ ulimit -t unlimited
+ ulimit -v unlimited
+ ulimit -n 64000
+ ulimit -m unlimited
+ ulimit -u 32000
+
echo -n $"Starting mongod: "
daemon --user "$MONGO_USER" $NUMACTL $mongod $OPTIONS
RETVAL=$?
@@ -66,7 +76,7 @@ restart () {
start
}
-ulimit -n 12000
+
RETVAL=0
case "$1" in