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

db.runCommand("top") fails when there are too many collections

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • 3.2.0
    • None
    • Querying
    • None
    • ALL

    Description

      When there are too many namespaces in a MongoDB deployment, the top command will return a document larger than the 16MB BSON limit.

      You can reproduce this easily by starting a mongod (I highly recommend using mmapv1 as it has way less overhead per collection than wt does) and doing something like

        for(var j = 0; j < 200000; j++) {
         db.createCollection("collection__"+j);
        }
      

      Running mongotop fails with the message:

      mongotop --port 7777
      2016-08-03T11:16:54.361-0500	Failed: BSONObj size: 40761145 (0x26DF739) is invalid. Size must be between 0 and 16793600(16MB) First element: note: "all times in microseconds"
      

      The shell returns that same error when running the top command manually.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kyle.erf Kyle Erf
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: