Skip to content

Instantly share code, notes, and snippets.

@hofmeister
Created June 29, 2016 08:32
Show Gist options
  • Save hofmeister/a4706604c3b899eb0288f0442be5f6c4 to your computer and use it in GitHub Desktop.
Save hofmeister/a4706604c3b899eb0288f0442be5f6c4 to your computer and use it in GitHub Desktop.
mongod systemd script for Ubuntu 16
[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target
[Service]
User=mongodb
TasksAccounting=false
TasksMax=infinity
LimitFSIZE=infinity
LimitCPU=infinity
LimitAS=infinity
LimitNOFILE=64000
LimitRSS=infinity
LimitNPROC=256899
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf
[Install]
WantedBy=multi-user.target
@hofmeister
Copy link
Author

Note that TasksAccounting=false is quite important to avoid pthread / err 11 resource temporarily unavailable issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment