{
  "id": "database/mongodb-document-too-large",
  "signature": "MongoServerError: BSONObj size: 17825792 (0x1100000) is invalid. Size must be between 0 and 16793600(16MB) First element: _id: ObjectId('...')",
  "signature_zh": "MongoServerError: BSONObj 大小：17825792 (0x1100000) 无效。大小必须在 0 到 16793600(16MB) 之间。第一个元素：_id: ObjectId('...')",
  "regex": "MongoServerError: BSONObj size: \\d+ \\(0x[0-9a-fA-F]+\\) is invalid\\. Size must be between 0 and 16793600\\(16MB\\)",
  "domain": "database",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "The document being inserted or updated exceeds MongoDB's 16MB BSON document size limit.",
  "root_cause_type": "generic",
  "root_cause_zh": "插入或更新的文档超过了 MongoDB 的 16MB BSON 文档大小限制。",
  "versions": [
    {
      "version": "MongoDB 6.0.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "MongoDB 7.0.4",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "MongoDB 5.0.24",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "MongoDB's 16MB limit is hardcoded and cannot be changed; no such startup parameter exists.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Compression must be done at the storage engine level (WiredTiger), not by the application; the BSON size check occurs before storage.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use GridFS to store large documents. Split the document into chunks and store them in fs.files and fs.chunks collections. Example: `mongofiles put large_document.json`",
      "success_rate": 0.85,
      "how": "Use GridFS to store large documents. Split the document into chunks and store them in fs.files and fs.chunks collections. Example: `mongofiles put large_document.json`",
      "condition": "",
      "sources": []
    },
    {
      "action": "Restructure the document to remove large arrays or subdocuments, storing them in separate collections with references.",
      "success_rate": 0.8,
      "how": "Restructure the document to remove large arrays or subdocuments, storing them in separate collections with references.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Use GridFS to store large documents. Split the document into chunks and store them in fs.files and fs.chunks collections. Example: `mongofiles put large_document.json`",
    "Restructure the document to remove large arrays or subdocuments, storing them in separate collections with references."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.mongodb.com/docs/manual/reference/limits/#mongodb-limit-BSON-Document-Size",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-06-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}