ERM redis runtime_error ai_generated partial

ERR 槽迁移超时,槽 1234

ERR Slot migration timed out for slot 1234

ID: redis/cluster-slot-migration-timeout

其他格式: JSON · Markdown 中文 · English
80%修复率
85%置信度
1证据数
2023-08-15首次发现

版本兼容性

版本状态引入弃用备注
Redis 6.2.0 active
Redis 7.0.0 active
Redis 7.2.0 active

根因分析

集群槽迁移操作超过配置的超时时间,通常由网络拥塞或大键迁移导致。

English

A cluster slot migration operation exceeded the configured timeout, typically due to network congestion or large key migration.

generic

官方文档

https://redis.io/docs/latest/operate/oss_and_stack/management/cluster/

解决方案

  1. Use CLUSTER SETSLOT MIGRATING to abort the migration and retry with smaller batches. Example: redis-cli -h source-node CLUSTER SETSLOT 1234 MIGRATING destination-node-id; then use redis-cli --cluster reshard with --pipeline 10 to limit key count per migration.
  2. Increase cluster migration timeout via config: CONFIG SET cluster-migration-timeout 60000 (60 seconds) and retry the migration.
  3. Identify and split large keys (e.g., >10MB) before migration to avoid timeout.

无效尝试

常见但无效的做法:

  1. 70% 失败

    Restarting nodes without addressing the underlying migration issue can cause data inconsistency and longer downtime.

  2. 90% 失败

    Deleting slot data breaks cluster integrity and leads to data loss; the slot must be properly reassigned.

  3. 60% 失败

    A very high timeout masks the problem and may lead to long stalls; it does not fix the root cause like large keys.