summaryrefslogtreecommitdiff
path: root/debian/init.d
diff options
context:
space:
mode:
Diffstat (limited to 'debian/init.d')
-rw-r--r--debian/init.d12
1 files changed, 11 insertions, 1 deletions
diff --git a/debian/init.d b/debian/init.d
index 909def7049b..4a62a677dba 100644
--- a/debian/init.d
+++ b/debian/init.d
@@ -120,7 +120,17 @@ running() {
}
start_server() {
-# Start the process using the wrapper
+ # 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
+
+ # Start the process using the wrapper
start-stop-daemon --background --start --quiet --pidfile $PIDFILE \
--make-pidfile --chuid $DAEMONUSER \
--exec $NUMACTL $DAEMON $DAEMON_OPTS