{
  "schema_version": 2,
  "id": "develop/reference/errors/common/masterdown",
  "title": "MASTERDOWN error",
  "url": "https://redis.io/docs/latest/develop/reference/errors/common/masterdown/",
  "summary": "A replica lost its link to its primary and is set not to serve data that may be out of date.",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-11-02T15:10:28+01:00",
  "page_type": "content",
  "content_hash": "5624fcd7e41b16c912a5e231b31eebd2476c3ce65527c9eb061c44b9e43d495b",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "A replica returns this error when it has lost its connection to its primary, and its `replica-serve-stale-data` setting is `no`. With this setting, the replica refuses commands while it can't get updates from the primary. This way, it never answers with data that may be out of date.\n\n[code example]\n\nIn redis-py, this error is `MasterDownError: Link with MASTER is down and replica-serve-stale-data is set to 'no'.`"
    },
    {
      "id": "how-to-fix-it",
      "title": "How to fix it",
      "role": "content",
      "text": "1. On the replica, run [`INFO replication`](https://redis.io/docs/latest/commands/info). `master_link_status:down` confirms that the link is down. `master_host` and `master_port` show the address of the primary that the replica is trying to reach.\n1. Check that the primary is running, and that the replica can reach it at that address.\n1. If the primary requires a password, check that the replica has it in its `masterauth` setting. If the primary uses access control list (ACL) users, set `masteruser` too. See [Setting a replica to authenticate to a master](https://redis.io/docs/latest/operate/oss_and_stack/management/replication#setting-a-replica-to-authenticate-to-a-master).\n1. Look in the replica's log for the reason that the link failed.\n\nIf your app can use data that may be out of date, set `replica-serve-stale-data yes`, which is the default. The replica then keeps answering commands while the link is down."
    }
  ],
  "examples": [
    {
      "id": "overview-ex0",
      "language": "plaintext",
      "code": "MASTERDOWN Link with MASTER is down and replica-serve-stale-data is set to 'no'.",
      "section_id": "overview"
    }
  ]
}
