{
  "id": "redis/redis-timeout-while-waiting-for-replica-ack",
  "signature": "Error: Timeout waiting for replica acknowledgment during failover",
  "signature_zh": "错误：故障转移期间等待副本确认超时",
  "regex": "Error: Timeout waiting for replica acknowledgment during failover",
  "domain": "redis",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "During a Redis Sentinel or cluster failover, the master waits for replicas to acknowledge data synchronization, but network latency or replica lag causes the timeout to expire.",
  "root_cause_type": "generic",
  "root_cause_zh": "在Redis哨兵或集群故障转移期间，主节点等待副本确认数据同步，但网络延迟或副本滞后导致超时过期。",
  "versions": [
    {
      "version": "redis 6.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "redis 7.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "redis 7.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Increasing the timeout in redis.conf to 300 seconds",
      "why_fails": "Higher timeout may mask underlying issues like replica lag or network problems; failover can still fail if replicas are too far behind.",
      "fail_rate": 0.65,
      "condition": "",
      "sources": []
    },
    {
      "action": "Manually promoting a replica to master without waiting",
      "why_fails": "Forcing promotion can cause data loss if the replica is not fully synchronized; the new master may miss recent writes.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Disabling replication checks altogether",
      "why_fails": "Turning off replication checks compromises data consistency and can lead to split-brain scenarios.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Check replica lag with `INFO replication` and reduce it by ensuring replicas have sufficient resources (CPU, network). If lag is high, temporarily increase `repl-timeout` in redis.conf: `repl-timeout 120`.",
      "success_rate": 0.8,
      "how": "Check replica lag with `INFO replication` and reduce it by ensuring replicas have sufficient resources (CPU, network). If lag is high, temporarily increase `repl-timeout` in redis.conf: `repl-timeout 120`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use `CLUSTER FAILOVER FORCE` on a replica that is synced within acceptable lag to trigger a forced failover without waiting for all replicas.",
      "success_rate": 0.75,
      "how": "Use `CLUSTER FAILOVER FORCE` on a replica that is synced within acceptable lag to trigger a forced failover without waiting for all replicas.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Optimize network between master and replicas: use dedicated links or lower latency paths. Monitor with `redis-cli --latency` to identify bottlenecks.",
      "success_rate": 0.7,
      "how": "Optimize network between master and replicas: use dedicated links or lower latency paths. Monitor with `redis-cli --latency` to identify bottlenecks.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Check replica lag with `INFO replication` and reduce it by ensuring replicas have sufficient resources (CPU, network). If lag is high, temporarily increase `repl-timeout` in redis.conf: `repl-timeout 120`.",
    "Use `CLUSTER FAILOVER FORCE` on a replica that is synced within acceptable lag to trigger a forced failover without waiting for all replicas.",
    "Optimize network between master and replicas: use dedicated links or lower latency paths. Monitor with `redis-cli --latency` to identify bottlenecks."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://redis.io/docs/latest/operate/oss_and_stack/management/replication/",
  "official_doc_section": null,
  "error_code": "ERR",
  "verification_tier": "ai_generated",
  "confidence": 0.82,
  "fix_success_rate": 0.78,
  "resolvable": "partial",
  "first_seen": "2024-04-12",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}