Mongodb returnes messages larger than the driver can handle

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 1.3, 1.4, 3.0.0
    • Component/s: None
    • Environment:
      Linux x64, Mongo 2.4
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Hello guys,

      I've run into the situation when a response message from mongodb had length 17947035 bytes. But the driver limits incoming messages by 16777216 bytes. It's apparent that mongodb can return larger documents than the driver can process.

      This strange limit is defined in connection.js:

      // Retrieve the message size
      var sizeOfMessage = binaryutils.decodeUInt32(data, 0);
      // If we have a negative sizeOfMessage emit error and return
      if(sizeOfMessage < 0 || sizeOfMessage > self.maxBsonSize) {

      Shouldn't this limit be lifted to correspond to real mongodb capabilities?

      And one more thing. Error message looked like this:

      Error: connection closed due to parseError

      The message is very unhelpful, I had a long debugging session to get to the real reason of the problem.

      Shouldn't the message be updated to point to the real reason of the error?

      Thanks,
      Evgeny

            Assignee:
            Christian Amor Kvalheim
            Reporter:
            Evgeny Lukianchikov
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: