Skip to content

Commit e7a9b46

Browse files
committed
Increase the file descriptor limit for the systemd service.
The default service FD limit of 1024 is not sufficient for MongoDB deployments that handle thousands of client connections and databases.
1 parent 2dec490 commit e7a9b46

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

files/mongodb.service

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Documentation=man:mongod(1)
55
[Service]
66
User=mongodb
77
ExecStart=/usr/bin/mongod --config /etc/mongod.conf
8+
LimitNOFILE=65535
9+
LimitNPROC=65535
810

911
[Install]
1012
WantedBy=multi-user.target

0 commit comments

Comments
 (0)