MongoDB BSONObj size exceeds maximum 16 MB (16777216 bytes)
Single BSON document grew past MongoDB’s 16 MB hard document limit.
Runs locally in browser
Free · No login
Independently Verified 2026-11-25
v4.0.0
Identifier: MongoDB BSONObj size exceeds maximum 16 MB (16777216 bytes)
Platform: MongoDB
Interactive Diagnostic Checklist
Safe Diagnostic Command:
db.collection.stats()
Technical Explanation
Single BSON document grew past MongoDB’s 16 MB hard document limit. Verified technical resolution: Avoid unbounded embedded arrays; move child logs/events into a separate referenced collection or GridFS.
Worked Examples
- Diagnostic check: db.collection.stats()
Limitations & Assumptions
- Confirm exact software version and execution layer before applying configuration changes in production.
Source References & Verification
Resource ID: err-mongo-document-exceeds-16mb · Independently verified: 2026-11-25