MD4X-00-001550 - MongoDB must limit the total number of concurrent connections to the database.

Warning! Audit Deprecated

This audit has been deprecated and will be removed in a future update.

View Next Audit Version

Information

MongoDB must limit the total number of concurrent connections to the database.

Solution

MongoDB can limit the total number of connections served by mongod process by setting the following in the MongoDB configuration file (default location: /etc/mongod.conf)

net:
maxIncomingConnections: %int%

See the following documentation:
https://docs.mongodb.com/v4.4/reference/configuration-options/

Products outside of MongoDB can be used to monitor database sessions and limit the maximum number of connections that can be made.

Alternatively most UNIX-like operating systems, including Linux and macOS, provide ways to limit and control the usage of system resources such as threads, files, and network connections on a per-process and per-user basis.

These ulimits prevent single users from using too many system resources.

The following is the MongoDB documentation regarding these user limits: https://docs.mongodb.com/v4.4/reference/ulimit/

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_MDB_Enterprise_Advanced_4-x_V1R3_STIG.zip

Item Details

References: CAT|II, CCI|CCI-000054, Rule-ID|SV-252148r879511_rule, STIG-ID|MD4X-00-001550, Vuln-ID|V-252148

Plugin: Unix

Control ID: 1336c8ff24510e5c65b3b8ccd1f185cbb0a7fde212177cdb678c5f6c09762bc2