Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-12382

Windows hosts do not honor --maxConns values > 20,000

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.6.0-rc0
    • Affects Version/s: None
    • Component/s: Networking
    • Windows

      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

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            kamran.khan Kamran K.
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: