{
  "schema_version": 2,
  "id": "develop/reference/errors/common/noreplicas",
  "title": "NOREPLICAS error",
  "url": "https://redis.io/docs/latest/develop/reference/errors/common/noreplicas/",
  "summary": "The primary accepts writes only when enough replicas are connected, and there aren't enough.",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-11-02T15:10:28+01:00",
  "page_type": "content",
  "content_hash": "8da607bb5a0286f7edf1ea557a69810a8f8eadd51896c43a8051f0cc65465a13",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "A primary returns this error when you send a write, but fewer replicas are connected than its `min-replicas-to-write` setting requires. This setting limits how much data you can lose if the primary fails. Reads still work. Writes start working again when enough replicas are connected.\n\nA replica only counts if it's up to date. Each replica reports to its primary every second. If a replica hasn't reported for more than `min-replicas-max-lag` seconds, the primary doesn't count it.\n\n[code example]"
    },
    {
      "id": "how-to-fix-it",
      "title": "How to fix it",
      "role": "content",
      "text": "1. On the primary, run [`INFO replication`](https://redis.io/docs/latest/commands/info). `connected_slaves` shows how many replicas are connected. Each `slave0`, `slave1`, and so on line shows a replica's address and its `lag` in seconds.\n1. Fix the replicas that are missing or lagging. Check that they're running and can reach the primary. On a replica, `INFO replication` shows the state of its link to the primary.\n1. If writes must work with fewer replicas, lower `min-replicas-to-write`. Set it to `0` to turn the check off.\n\nSee [Allow writes only with N attached replicas](https://redis.io/docs/latest/operate/oss_and_stack/management/replication#allow-writes-only-with-n-attached-replicas)."
    }
  ],
  "examples": [
    {
      "id": "overview-ex0",
      "language": "plaintext",
      "code": "NOREPLICAS Not enough good replicas to write.",
      "section_id": "overview"
    }
  ]
}
