{
  "id": "redis/stream-group-claim-timeout",
  "signature": "ERR Error claiming messages for consumer 'consumer1' on stream 'mystream': timeout",
  "signature_zh": "ERR 为流 'mystream' 上的消费者 'consumer1' 认领消息时超时",
  "regex": "ERR Error claiming messages for consumer '.+' on stream '.+': timeout",
  "domain": "redis",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "The XCLAIM command timed out because the pending entries list (PEL) is too large or the consumer group is under heavy load, preventing the claim operation from completing within the idle timeout.",
  "root_cause_type": "generic",
  "root_cause_zh": "XCLAIM 命令超时，因为待处理条目列表 (PEL) 过大或消费者组负载过高，导致认领操作无法在空闲超时时间内完成。",
  "versions": [
    {
      "version": "Redis 7.2.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Redis 7.4.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Redis Stack 7.2.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Increasing the idle timeout for XCLAIM may hide the symptom but doesn't address the root cause of PEL bloat or consumer lag.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Manually deleting large PEL entries without understanding the consumer group state can cause message loss or duplicate processing.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Restarting the consumer group or Redis instance may temporarily clear the timeout but the PEL will rebuild from pending messages, leading to recurrence.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use XINFO GROUPS and XINFO CONSUMERS to inspect the PEL size, then trim pending entries with XTRIM or XDEL for acknowledged messages. For example: XINFO GROUPS mystream, then XDEL mystream <id1> <id2> for stale entries.",
      "success_rate": 0.8,
      "how": "Use XINFO GROUPS and XINFO CONSUMERS to inspect the PEL size, then trim pending entries with XTRIM or XDEL for acknowledged messages. For example: XINFO GROUPS mystream, then XDEL mystream <id1> <id2> for stale entries.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Increase the consumer group's idle timeout via the 'idle' parameter in XCLAIM, but also implement a background job to periodically clean up the PEL using XAUTOCLAIM with a reasonable count.",
      "success_rate": 0.75,
      "how": "Increase the consumer group's idle timeout via the 'idle' parameter in XCLAIM, but also implement a background job to periodically clean up the PEL using XAUTOCLAIM with a reasonable count.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Scale out consumers to reduce per-consumer PEL size, or use stream partitioning to distribute load across multiple streams.",
      "success_rate": 0.85,
      "how": "Scale out consumers to reduce per-consumer PEL size, or use stream partitioning to distribute load across multiple streams.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "使用 XINFO GROUPS 和 XINFO CONSUMERS 检查 PEL 大小，然后通过 XTRIM 或 XDEL 修剪待处理条目。例如：XINFO GROUPS mystream，然后对过期条目执行 XDEL mystream <id1> <id2>。",
    "通过 XCLAIM 的 'idle' 参数增加消费者组的空闲超时，同时实现后台任务定期使用 XAUTOCLAIM 清理 PEL，设置合理的 count 参数。",
    "扩展消费者数量以减少每个消费者的 PEL 大小，或使用流分区将负载分散到多个流上。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://redis.io/commands/xclaim/",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.78,
  "resolvable": "partial",
  "first_seen": "2024-03-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}