{
  "id": "communication/amqp-connection-forced",
  "signature": "AMQPConnectionError: connection forced (320) CONNECTION_FORCED",
  "signature_zh": "AMQPConnectionError: 连接强制关闭 (320) CONNECTION_FORCED",
  "regex": "AMQPConnectionError: connection forced \\(320\\) CONNECTION_FORCED",
  "domain": "communication",
  "category": "connection_error",
  "subcategory": null,
  "root_cause": "The AMQP broker (e.g., RabbitMQ) forcibly closed the connection due to a resource alarm (memory or disk) or an internal error, often signaled by the connection.blocked method.",
  "root_cause_type": "generic",
  "root_cause_zh": "AMQP 代理（如 RabbitMQ）因资源告警（内存或磁盘）或内部错误强制关闭连接，通常由 connection.blocked 方法指示。",
  "versions": [
    {
      "version": "RabbitMQ 3.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "RabbitMQ 3.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "RabbitMQ 3.13",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Restarting the client without checking broker resources leads to immediate reconnection and re-disconnection.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Increasing connection timeout doesn't address the underlying resource exhaustion.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Adding more consumer instances worsens resource pressure by creating more connections.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Check broker resource alarms via `rabbitmq-diagnostics check_alarms` and free up memory/disk. For memory: reduce queue sizes or set `vm_memory_high_watermark` lower. For disk: increase `disk_free_limit`.",
      "success_rate": 0.83,
      "how": "Check broker resource alarms via `rabbitmq-diagnostics check_alarms` and free up memory/disk. For memory: reduce queue sizes or set `vm_memory_high_watermark` lower. For disk: increase `disk_free_limit`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Implement connection recovery with backoff and listen to `connection.blocked` event. In Pika (Python): `connection.add_on_connection_blocked_callback(lambda c: time.sleep(10))`.",
      "success_rate": 0.78,
      "how": "Implement connection recovery with backoff and listen to `connection.blocked` event. In Pika (Python): `connection.add_on_connection_blocked_callback(lambda c: time.sleep(10))`.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Check broker resource alarms via `rabbitmq-diagnostics check_alarms` and free up memory/disk. For memory: reduce queue sizes or set `vm_memory_high_watermark` lower. For disk: increase `disk_free_limit`.",
    "Implement connection recovery with backoff and listen to `connection.blocked` event. In Pika (Python): `connection.add_on_connection_blocked_callback(lambda c: time.sleep(10))`."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.rabbitmq.com/amqp-0-9-1-reference.html#connection.forced",
  "official_doc_section": null,
  "error_code": "320",
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.83,
  "resolvable": "true",
  "first_seen": "2023-09-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [
    "AMQP",
    "RabbitMQ",
    "connection-forced"
  ],
  "locale": "en",
  "aliases": []
}