From e7a9b464f03d90f8c9f27b8fe7e4290893e7e686 Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Tue, 7 Mar 2017 01:18:45 -0500 Subject: [PATCH] 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. --- files/mongodb.service | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/mongodb.service b/files/mongodb.service index 6cd23bd6..a11a4037 100644 --- a/files/mongodb.service +++ b/files/mongodb.service @@ -5,6 +5,8 @@ Documentation=man:mongod(1) [Service] User=mongodb ExecStart=/usr/bin/mongod --config /etc/mongod.conf +LimitNOFILE=65535 +LimitNPROC=65535 [Install] WantedBy=multi-user.target