{
  "id": "python/sqlalchemy-connection-pool-exhausted",
  "signature": "sqlalchemy.exc.TimeoutError: QueuePool limit of size 5 overflow 10 reached, connection timed out, timeout 30",
  "signature_zh": "sqlalchemy.exc.TimeoutError：QueuePool 大小限制 5，溢出 10 已达到，连接超时，超时时间 30",
  "regex": "sqlalchemy\\.exc\\.TimeoutError:\\ QueuePool\\ limit\\ of\\ size\\ 5\\ overflow\\ 10\\ reached,\\ connection\\ timed\\ out,\\ timeout\\ 30",
  "domain": "python",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "Too many concurrent connections exceeding pool limits.",
  "root_cause_type": "generic",
  "root_cause_zh": "并发连接过多，超出池限制。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Setting pool_size to 0 (no limit).",
      "why_fails": "May cause database server overload.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "Disabling pool pre-ping.",
      "why_fails": "Does not address connection exhaustion.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase pool size and overflow appropriately.",
      "success_rate": 0.85,
      "how": "engine = create_engine(url, pool_size=20, max_overflow=30)",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use connection pooling middleware like PgBouncer.",
      "success_rate": 0.9,
      "how": "# Configure PgBouncer to pool connections externally",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-06-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}