0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-27 23:27:11 +01:00
mongodb/debian/mongod.upstart
Ernie Hershey 1b4c5d4f2c 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
2013-11-19 16:02:08 -05:00

28 lines
802 B
Plaintext

# Ubuntu upstart file at /etc/init/mongod.conf
# Recommended ulimit values for mongod or mongos
# See http://docs.mongodb.org/manual/reference/ulimit/#recommended-settings
#
limit fsize unlimited unlimited
limit cpu unlimited unlimited
limit as unlimited unlimited
limit nofile 64000 64000
limit rss unlimited unlimited
limit nproc 32000 32000
kill timeout 300 # wait 300s between SIGTERM and SIGKILL.
pre-start script
mkdir -p /var/lib/mongodb/
mkdir -p /var/log/mongodb/
end script
start on runlevel [2345]
stop on runlevel [06]
script
ENABLE_MONGOD="yes"
if [ -f /etc/default/mongod ]; then . /etc/default/mongod; fi
if [ "x$ENABLE_MONGOD" = "xyes" ]; then exec start-stop-daemon --start --quiet --chuid mongodb --exec /usr/bin/mongod -- --config /etc/mongod.conf; fi
end script