{
  "id": "communication/mqtt-packet-identifier-exhausted",
  "signature": "MQTT CONNACK: Packet identifier exhausted (reason code 0x93)",
  "signature_zh": "MQTT CONNACK：数据包标识符耗尽（原因代码 0x93）",
  "regex": "MQTT.*Packet\\s+identifier\\s+exhausted|reason\\s+code\\s+0x93",
  "domain": "communication",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "MQTT broker runs out of available packet identifiers (0-65535) because too many unacknowledged PUBLISH/QoS>0 or SUBSCRIBE messages are in flight, typically due to slow consumers or network congestion.",
  "root_cause_type": "generic",
  "root_cause_zh": "MQTT 代理耗尽可用数据包标识符（0-65535），因为太多未确认的 PUBLISH/QoS>0 或 SUBSCRIBE 消息正在传输中，通常是由于消费者缓慢或网络拥塞。",
  "versions": [
    {
      "version": "MQTT 3.1.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "MQTT 5.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Mosquitto 2.0.15",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "EMQX 5.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "HiveMQ 2023.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Increasing the MQTT client's keepalive interval only delays disconnection; the packet identifier pool remains exhausted.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Setting QoS=0 (fire-and-forget) reduces reliability and may cause message loss; it also doesn't fix the root cause if the broker's identifier pool is globally exhausted across all clients.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Restarting the broker clears the pool temporarily but the same pattern will recur if the underlying slow-consumer issue isn't addressed.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase the packet identifier pool size on the broker (if configurable): for Mosquitto, set 'max_inflight_messages' to a higher value (e.g., 65535) to allow more concurrent in-flight messages.",
      "success_rate": 0.85,
      "how": "Increase the packet identifier pool size on the broker (if configurable): for Mosquitto, set 'max_inflight_messages' to a higher value (e.g., 65535) to allow more concurrent in-flight messages.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Implement flow control on the client: limit the number of unacknowledged PUBLISH messages by using a sliding window (e.g., max 10 in-flight per topic) and wait for PUBACK before sending the next.",
      "success_rate": 0.9,
      "how": "Implement flow control on the client: limit the number of unacknowledged PUBLISH messages by using a sliding window (e.g., max 10 in-flight per topic) and wait for PUBACK before sending the next.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Upgrade to MQTT 5.0 and use the 'Topic Alias' and 'Receive Maximum' properties to reduce identifier consumption by allowing the broker to limit client send rate.",
      "success_rate": 0.8,
      "how": "Upgrade to MQTT 5.0 and use the 'Topic Alias' and 'Receive Maximum' properties to reduce identifier consumption by allowing the broker to limit client send rate.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Increase the packet identifier pool size on the broker (if configurable): for Mosquitto, set 'max_inflight_messages' to a higher value (e.g., 65535) to allow more concurrent in-flight messages.",
    "Implement flow control on the client: limit the number of unacknowledged PUBLISH messages by using a sliding window (e.g., max 10 in-flight per topic) and wait for PUBACK before sending the next.",
    "Upgrade to MQTT 5.0 and use the 'Topic Alias' and 'Receive Maximum' properties to reduce identifier consumption by allowing the broker to limit client send rate."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901257",
  "official_doc_section": null,
  "error_code": "0x93",
  "verification_tier": "ai_generated",
  "confidence": 0.84,
  "fix_success_rate": 0.81,
  "resolvable": "true",
  "first_seen": "2024-06-12",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}