[SERVER-12382] Windows hosts do not honor --maxConns values > 20,000 Created: 16/Jan/14  Updated: 11/Jul/16  Resolved: 18/Feb/14

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: None
Fix Version/s: 2.6.0-rc0

Type: Bug Priority: Major - P3
Reporter: Kamran K. Assignee: Mark Benvenuto
Resolution: Done Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-8943 max connections is hard coded to 20,000 Closed
Operating System: Windows
Participants:

 Description   

In 2.5.x, the hard upper limit of 20,000 connections has been removed (SERVER-8943). Windows hosts still have this upper limit, however, because there's a _WIN32 block in mongo/util/net/listen.cpp:

    int getMaxConnections() {
#ifdef _WIN32
        return DEFAULT_MAX_CONN;
#else
        struct rlimit limit;
        verify( getrlimit(RLIMIT_NOFILE,&limit) == 0 );
 
        int max = (int)(limit.rlim_cur * .8);
 
        LOG(1) << "fd limit"
               << " hard:" << limit.rlim_max
               << " soft:" << limit.rlim_cur
               << " max conn: " << max
               << endl;
 
        return max;
#endif
    }

Server output:

2014-01-16T11:33:13.279-0500 [initandlisten] options: { maxConns: 25000 }
2014-01-16T11:33:13.326-0500 [initandlisten]  --maxConns too high, can only handle 20000


Version: adb2c9c330f67e24adbb5f1a306f8484befe93a9



 Comments   
Comment by Githook User [ 18/Feb/14 ]

Author:

{u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}

Message: SERVER-12382 Windows hosts do not honor --maxConns values > 20,000
Branch: master
https://github.com/mongodb/mongo/commit/c43cc49609612800c37444de3a4ca0b434a8e061

Comment by Daniel Pasette (Inactive) [ 02/Feb/14 ]

make it 1,000,000 million since the intent is to remove the limit completely.

Comment by Mark Benvenuto [ 28/Jan/14 ]

There is no reason not to remove the limit on Windows. In Windows, the OS has a limit by sku (server OS skus have no limit, client OS skus have some limit which is a machine limit), but other then that, there is no fixed limit. You are limited by machine memory, etc, but I also cannot pick a number to give you. I can set the limit to 100,000 for instance or 1 million just to pick some number since the OS will not give you a number.

Generated at Thu Feb 08 03:28:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.