Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-194

Show size when whining about document being too big

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.10
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      pymongo 1.9

      If the pymongo code considers a document to be too large then it raises:

      InvalidDocument: document too large - BSON documents are limited to 4 MB

      Please change the message to include the size of the document itself. For example if my doc is 300MB then I have seriously screwed up whereas if it is 4.1MB then a little fine tuning or using Mongo 1.7 will fix the problem due to 8MB limit.

      Note that the message appears once in Python code and twice in C code.

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            rogerbinns Roger Binns
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: