{
  "schema_version": 2,
  "id": "develop/reference/errors/common/tryagain",
  "title": "TRYAGAIN error",
  "url": "https://redis.io/docs/latest/develop/reference/errors/common/tryagain/",
  "summary": "A command accessed multiple keys while their hash slot was being migrated between cluster nodes.",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-11-02T15:10:28+01:00",
  "page_type": "content",
  "content_hash": "a038a8fa771e6848bea260f9de2f577e810040bfcd05aea1b95830a40735aeaa",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "A Redis cluster returns this error when a command with several keys runs while their hash slot is moving to another node. Some of the keys are still on the old node, and some aren't, so neither node can run the command. The error is temporary. It stops when the slot has finished moving.\n\n[code example]\n\nIn redis-py, this error is `TryAgainError: Multiple keys request during rehashing of slot`.\n\nA similar error, `TRYAGAIN Slot is being trimmed`, means that a write reached a node while it was deleting all the keys of the slot, for example, after `SFLUSH`. It's temporary too."
    },
    {
      "id": "example",
      "title": "Example",
      "role": "example",
      "text": "During the move, the old node still has `user:{42}:profile`, but `user:{42}:cart` is already on the new node:\n\n[code example]"
    },
    {
      "id": "how-to-fix-it",
      "title": "How to fix it",
      "role": "content",
      "text": "Wait a moment and send the command again. Cluster clients usually retry for you. For example, redis-py's `RedisCluster` retries the command a few times. If the slot is still moving after that, it raises `ClusterError: TTL exhausted.`\n\nIf the error doesn't go away, the slot may be stuck in the middle of a move. To check, run `redis-cli --cluster check <host>:<port>`. It lists any slots that are still open, which means they're being moved. See [Scale with Redis Cluster](https://redis.io/docs/latest/operate/oss_and_stack/management/scaling)."
    }
  ],
  "examples": [
    {
      "id": "overview-ex0",
      "language": "plaintext",
      "code": "TRYAGAIN Multiple keys request during rehashing of slot",
      "section_id": "overview"
    },
    {
      "id": "example-ex0",
      "language": "plaintext",
      "code": "> MGET user:{42}:profile user:{42}:cart\n(error) TRYAGAIN Multiple keys request during rehashing of slot",
      "section_id": "example"
    }
  ]
}
