{
  "id": "mongodb/atlas-connection-pool-exhausted",
  "signature": "MongoServerError: connection pool exhausted: maxPoolSize of 100 reached",
  "signature_zh": "MongoServerError：连接池耗尽：已达到maxPoolSize 100",
  "regex": "connection pool exhausted:\\s*maxPoolSize of \\d+ reached",
  "domain": "mongodb",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "The application opened more connections than the maxPoolSize limit, often due to unclosed cursors or connection leaks.",
  "root_cause_type": "generic",
  "root_cause_zh": "应用程序打开的连接数超过了maxPoolSize限制，通常是由于未关闭的游标或连接泄漏。",
  "versions": [
    {
      "version": "mongodb 7.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "mongodb 6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "mongodb 5.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "mongodb 4.4",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "mongodb-atlas 1.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Leaks will still exhaust the pool eventually, and high connections may overwhelm the server.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The leak will reoccur and exhaust the pool again.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Ensure all cursors are closed in a try-finally block: try { cursor = collection.find(); ... } finally { cursor.close(); }",
      "success_rate": 0.9,
      "how": "Ensure all cursors are closed in a try-finally block: try { cursor = collection.find(); ... } finally { cursor.close(); }",
      "condition": "",
      "sources": []
    },
    {
      "action": "Set a lower maxPoolSize and monitor connections: MongoClient.connect(uri, { maxPoolSize: 50, minPoolSize: 10 })",
      "success_rate": 0.75,
      "how": "Set a lower maxPoolSize and monitor connections: MongoClient.connect(uri, { maxPoolSize: 50, minPoolSize: 10 })",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "确保所有游标在try-finally块中关闭：try { cursor = collection.find(); ... } finally { cursor.close(); }",
    "设置较低的maxPoolSize并监控连接：MongoClient.connect(uri, { maxPoolSize: 50, minPoolSize: 10 })"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.mongodb.com/docs/manual/reference/connection-string-options/#maxPoolSize",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-09-12",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}