# ERR Slot migration timed out for slot 1234

- **ID:** `redis/cluster-slot-migration-timeout`
- **Domain:** redis
- **Category:** runtime_error
- **Error Code:** `ERM`
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

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

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Redis 6.2.0 | active | — | — |
| Redis 7.0.0 | active | — | — |
| Redis 7.2.0 | active | — | — |

## Workarounds

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.** (85% success)
   ```
   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.** (75% success)
   ```
   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.** (80% success)
   ```
   Identify and split large keys (e.g., >10MB) before migration to avoid timeout.
   ```

## Dead Ends

- **** — Restarting nodes without addressing the underlying migration issue can cause data inconsistency and longer downtime. (70% fail)
- **** — Deleting slot data breaks cluster integrity and leads to data loss; the slot must be properly reassigned. (90% fail)
- **** — A very high timeout masks the problem and may lead to long stalls; it does not fix the root cause like large keys. (60% fail)
