summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorMathew Robinson <mathew.robinson@10gen.com>2017-09-12 13:14:39 -0400
committerMathew Robinson <mathew.robinson@10gen.com>2017-09-13 14:01:49 -0400
commit6c8dc5e004bf2c91df10975adef861bcf00af6cd (patch)
treee34fcd3e0e15477664e4049d678f7f854f116beb /debian
parentdc22fc57bff9e804ef42fbbf19e8f685a2cb434e (diff)
downloadmongo-6c8dc5e004bf2c91df10975adef861bcf00af6cd.tar.gz
SERVER-30853 Update Mongod init scripts to set unlimited locked memory
Diffstat (limited to 'debian')
-rw-r--r--debian/init.d1
-rw-r--r--debian/mongod.service2
-rw-r--r--debian/mongod.upstart1
3 files changed, 4 insertions, 0 deletions
diff --git a/debian/init.d b/debian/init.d
index a2b525a7b80..c47ac17b3de 100644
--- a/debian/init.d
+++ b/debian/init.d
@@ -133,6 +133,7 @@ start_server() {
ulimit -v unlimited
ulimit -n 64000
ulimit -m unlimited
+ ulimit -l unlimited
# In dash, ulimit takes -p for maximum user processes
# In bash, it's -u
diff --git a/debian/mongod.service b/debian/mongod.service
index 85bed745452..7f9be0c19fe 100644
--- a/debian/mongod.service
+++ b/debian/mongod.service
@@ -17,6 +17,8 @@ LimitAS=infinity
LimitNOFILE=64000
# processes/threads
LimitNPROC=64000
+# locked memory
+LimitMEMLOCK=infinity
# total threads (user+kernel)
TasksMax=infinity
TasksAccounting=false
diff --git a/debian/mongod.upstart b/debian/mongod.upstart
index 3a334c0f8ec..2ef9b98aaa9 100644
--- a/debian/mongod.upstart
+++ b/debian/mongod.upstart
@@ -9,6 +9,7 @@ limit as unlimited unlimited
limit nofile 64000 64000
limit rss unlimited unlimited
limit nproc 64000 64000
+limit memlock unlimited
kill timeout 300 # wait 300s between SIGTERM and SIGKILL.