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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6.0-rc0
    • Component/s: Networking
    • Labels:
    • Operating System:
      Windows

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: