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

if db.currentOp(true) exceeds 16MB, it returns invalid BSON size errors

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Gone away
    • Affects Version/s: 2.2.2
    • Fix Version/s: None
    • Component/s: Diagnostics
    • Labels:
      None
    • Operating System:
      ALL

      Description

      In this case, a db.currentOp(true) was issued on a mongos shell. Presumably, this will collect all db.currentOp(true) outputs from the shards, combine them and return the end result.

      I'm not sure if there is an easy way to avoid the problem. Perhaps it should only return what can fit in the 16MB document, rather than returning the error message. Or fail gracefully with a better error message.

      mongos> db.currentOp(true)
      Mon Jan 21 19:35:38 uncaught exception: error {
      "$err" : "Invalid BSONObj size: 17828054 (0xD6081001) first element: 0: { opid: "xxx:xxxxxxx", active: false, op: "update", ns: "xxxx.xxxx", query: { _id: "xxxxxx" }, client_s: "xxxxxxxxx:xxxxx", desc: "xxxxxxxx", threadId: "xxxxxxxxxxxx", connectionId: xxxxxx, waitingForLock: false, numYields: 0, lockStats: { timeLockedMicros: { r: 0, w: 709 }, timeAcquiringMicros: { r: 0, w: 7 } } }",
      "code" : 10334
      }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-platform Backlog - Platform Team
              Reporter:
              thomasr Thomas Rueckstiess
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: