[DOCS-14280] Documentation incorrectly states that configuration parameter net.maxIncomingConnections has a default value of 65536 Created: 10/Mar/21  Updated: 30/Oct/23  Due: 04/Feb/22  Resolved: 07/Sep/23

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Task Priority: Major - P3
Reporter: Eric Sommer Assignee: Nick Villahermosa
Resolution: Fixed Votes: 0
Labels: release
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Gantt Dependency
Related
Participants:
Days since reply: 21 weeks, 6 days ago
Epic Link: DOCSP-11701
Story Points: 1

 Description   

Description

https://docs.mongodb.com/manual/reference/configuration-options/#net.maxIncomingConnections

Default: 65536

This parameter is shown to have a default value (of 65,536). In fact, this value:

For WINDOWS: defaults to a higher value
For UNIX: is calculated as a percentage of the open files (nofile) limit

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Nick Villahermosa [ 07/Sep/23 ]

Backports: v6.0, v5.0, v4.4

Comment by Jason Chan [ 03/Aug/23 ]

ashley.brown@mongodb.com , this comment captures the values to document. Specifically:

  • For windows: we set a hard limit cap of 1,000,000
  • For Linux: We calculate the value as maxConns = 0.8 * RLIMIT_NOFILE

 

Documentation on RLIMIT_NOFILE can be found here.

 

shameek.ray@mongodb.com , I don't believe this DOCs ticket is blocked on HELP-32687. I think the confusion is that currently, the server sets the default values as I stated above. However, we acknowledge that the calculation used to get the values for linux should be changed to better fit production environments. That is what HELP-32687 is expected to follow up on. I believe this DOCs ticket should continue and fix the documentation to match how the server currently behaves, and we can file another follow-up ticket to change it again for whatever release includes the new values we come up with from HELP-32687 in the future.

Comment by Shameek Ray [ 03/Aug/23 ]

eric.sommer@mongodb.com, do we already know the correct values for the places where we are currently incorrect? Is this dependent on the HELP ticket assigned to me? The HELP ticket right now seems to strive for a different set of exploration / research.

Comment by Ashley Brown [ 03/Aug/23 ]

Hi george.wangensteen@mongodb.com and eric.sommer@mongodb.com! Thanks for your attention to this issue. We'd love to have this documented, but as we mentioned above, we don't have enough information available to document.

You've recommended that we document the following information:

For WINDOWS: defaults to a higher value
For UNIX: is calculated as a percentage of the open files (nofile) limit

However, a higher value and a percentage of the open files limit are not specific enough values to put in the documentation. What higher value? What percentage? Eric and I met about these questions last year and determined together that a HELP ticket should be opened. 

We're requesting the specific values to document for each OS. The HELP ticket is currently assigned to shameek.ray@mongodb.com.

Once that info is available, please let us know, and we'll be happy to add it to the docs!

Comment by Eric Sommer [ 03/Aug/23 ]

As george.wangensteen@mongodb.com wrote, what's currently in the DOCS:

Default: 65536

is simply wrong. There is no such default.

As written in the description, this is the way the server (mongod) currently behaves:

For WINDOWS: max connections defaults to a higher value
For UNIX: max connections has no hard-coded value, but rather is calculated as a percentage of the open files (nofile) limit

Comment by George Wangensteen [ 03/Aug/23 ]

Hi, I'm reopoening this due to the continuing confusion around this issue; the above slack thread is a good example. While I agree we should do the linked HELP ticket to improve our recommendations + defaults around connections, I don't understand what question there is needed to do this ticket. We should fix the documentation so that is correct based on the servers current behavior, and then can change the docs if the server behavior changes. In my understanding, the linked HELP ticket is about improving the server default and possible recommendations; not about the defaults today, which are documented both in the above slack thread I copied and that ticket. If we need more information to document things correctly today, feel free to let me know or open another ticket.

Comment by Memento Slack Bot [ 03/Aug/23 ]

Slack Thread captured from #server by george.wangensteen@mongodb.com

However, on linux, the server reads the `rlimit`s (see <https://github.com/10gen/mongo/blob/37d84072b5c5b9fd723db5fa133fb202ad2317f1/src/mongo/transport/service_entry_point_impl.cpp#L145-L155>), and will lower the limit to `.8 * rlim_cur` if possible. At least on some of our EA service files, we shipped with LimitNOFILE=64000, whcih would effectively limit max incoming connections to 54000. But I'm not sure what `rlimit` s are configured on Atlas.

Comment by Emet Ozar [ 02/Jun/23 ]

The HELP ticket associated with this has been closed twice. We do not have the information to update the documentation. Feel free to re-open this ticket if these questions are answered.

Comment by Eric Sommer [ 30/Mar/22 ]

ashley.brown I just found https://jira.mongodb.org/browse/DOCS-5196 – so this looks like a duplicate.

Generated at Thu Feb 08 08:09:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.