# NOREPLICAS: Too few healthy replicas to write

> With min-replicas-to-write set, the primary refuses writes when fewer than that many replicas are connected and within the lag bound.

Source: https://sqlly.app/errors/redis/noreplicas
Last updated: 2026-11-30
License: Text and data [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) (credit SQLly, sqlly.app); code and SQL snippets [MIT](https://opensource.org/license/mit). [Details](https://sqlly.app/license).
Note: Quoted error message text belongs to its database vendor.

- Error prefix: `NOREPLICAS`
- Category: Cluster and replication

Error message:

```text
NOREPLICAS Not enough good replicas to write.
```

## What it means

NOREPLICAS is a write-availability guard. When min-replicas-to-write and min-replicas-max-lag are set, the primary tracks how many replicas are connected and acknowledging within the lag window, and it refuses writes while that count is short. The point is bounded data loss: a primary that cannot replicate should not be accepting writes nobody will see if it dies.

It reads like a replica-side error, but it is the primary refusing. Typical triggers are network partitions that silence replicas, replicas down for maintenance, and lag bounds set tighter than the workload allows, so the guard trips even though the replicas are technically connected.

## Common causes

- Replicas are disconnected, crashed or cut off by the network, and the connected count fell below the minimum.
- Replicas are connected but too slow: their acknowledgements exceed min-replicas-max-lag seconds.
- The bounds were configured for an older topology and no longer match the fleet.

## How to fix it

1. Compare the healthy-replica count with the configured minimum:

   ```sql
   INFO replication
   CONFIG GET min-replicas-to-write
   CONFIG GET min-replicas-max-lag
   ```
2. Restore connectivity or capacity to the replicas; writes resume automatically once the guard is satisfied.
3. Relax the guard only consciously, such as for a maintenance window. CONFIG SET takes effect at once but is lost on restart. To persist it, set min-replicas-to-write in the config file the server was started with, then run CONFIG REWRITE (it fails with "The server is running without a config file" when the server was started from the command line):

   ```sql
   CONFIG SET min-replicas-to-write 0
   CONFIG REWRITE
   ```

## Reproduce it safely

```sql
redis-server --port 7311 --min-replicas-to-write 1 --min-replicas-max-lag 10 --save '' &
redis-cli -p 7311 SET foo bar
# (error) NOREPLICAS Not enough good replicas to write.
```

## How SQLly helps

SQLly's editor runs INFO replication and the CONFIG GET pair in one window, and the NOREPLICAS reply is printed verbatim, so the guard and the replica state behind it are both visible before you relax anything.

## Questions

### Why is my healthy primary refusing writes?

It is the durability guard: not enough replicas are acknowledging in time. The primary itself is fine; its replication is not.

### Does this apply to Redis Cluster?

Yes, per primary. A cluster primary with the guard configured also refuses writes when its replica count dips below the minimum.

## Related errors

- [`MISCONF`](https://sqlly.app/errors/redis/misconf): Persistence is failing, writes stopped
- [`READONLY`](https://sqlly.app/errors/redis/readonly): Write rejected on a read only replica

The code and message text are from the [Redis documentation and source code](https://redis.io/docs/latest/).
