diff options
-rw-r--r-- | debian/init.d | 1 | ||||
-rw-r--r-- | debian/mongod.service | 2 | ||||
-rw-r--r-- | debian/mongod.upstart | 1 | ||||
-rwxr-xr-x | rpm/init.d-mongod | 1 | ||||
-rw-r--r-- | rpm/init.d-mongod.suse | 1 | ||||
-rw-r--r-- | rpm/mongod.service | 2 |
6 files changed, 8 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. diff --git a/rpm/init.d-mongod b/rpm/init.d-mongod index 56539ef4d42..4e172b9f15c 100755 --- a/rpm/init.d-mongod +++ b/rpm/init.d-mongod @@ -64,6 +64,7 @@ start() ulimit -n 64000 ulimit -m unlimited ulimit -u 64000 + ulimit -l unlimited echo -n $"Starting mongod: " daemon --user "$MONGO_USER" --check $mongod "$NUMACTL $mongod $OPTIONS >/dev/null 2>&1" diff --git a/rpm/init.d-mongod.suse b/rpm/init.d-mongod.suse index fae1fb8b3f3..2216507a009 100644 --- a/rpm/init.d-mongod.suse +++ b/rpm/init.d-mongod.suse @@ -65,6 +65,7 @@ start() ulimit -n 64000 ulimit -m unlimited ulimit -u 64000 + ulimit -l unlimited echo -n "Starting mongod: " $NUMACTL /sbin/start_daemon -u "$MONGO_USER" -p "$PIDFILEPATH" $mongod $OPTIONS >/dev/null 2>&1 diff --git a/rpm/mongod.service b/rpm/mongod.service index 708bf663614..f9244debbd5 100644 --- a/rpm/mongod.service +++ b/rpm/mongod.service @@ -23,6 +23,8 @@ LimitAS=infinity LimitNOFILE=64000 # processes/threads LimitNPROC=64000 +# locked memory +LimitMEMLOCK=infinity # total threads (user+kernel) TasksMax=infinity TasksAccounting=false |