mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
3dc3db0d78
We were previously waiting for network.target, which does not actually mean the network interface will be up and have an IP address assigned. During some reboots, it's possible that mongod would start up before the network interface was fully online, and this caused startup failures if mongod was configured to listen on a specific IP address. Now we wait for network-online.target instead to ensure the IP address is available when mongod starts.
34 lines
751 B
Desktop File
34 lines
751 B
Desktop File
[Unit]
|
|
Description=MongoDB Database Server
|
|
Documentation=https://docs.mongodb.org/manual
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
User=mongodb
|
|
Group=mongodb
|
|
EnvironmentFile=-/etc/default/mongod
|
|
ExecStart=/usr/bin/mongod --config /etc/mongod.conf
|
|
PIDFile=/var/run/mongodb/mongod.pid
|
|
# file size
|
|
LimitFSIZE=infinity
|
|
# cpu time
|
|
LimitCPU=infinity
|
|
# virtual memory size
|
|
LimitAS=infinity
|
|
# open files
|
|
LimitNOFILE=64000
|
|
# processes/threads
|
|
LimitNPROC=64000
|
|
# locked memory
|
|
LimitMEMLOCK=infinity
|
|
# total threads (user+kernel)
|
|
TasksMax=infinity
|
|
TasksAccounting=false
|
|
|
|
# Recommended limits for mongod as specified in
|
|
# https://docs.mongodb.com/manual/reference/ulimit/#recommended-ulimit-settings
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|