# 流条目大小超出服务器限制

- **ID:** `redis/stream-entry-too-large`
- **领域:** redis
- **类别:** data_error
- **错误码:** `ERM`
- **验证级别:** ai_generated
- **修复率:** 88%

## 根因

单个流条目大小超过了配置的 stream-node-max-bytes 限制，导致无法插入。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 7.0 | active | — | — |
| 7.2 | active | — | — |
| 7.4 | active | — | — |

## 解决方案

1. ```
   将数据拆分为多个流条目，每个条目小于 stream-node-max-bytes（默认 4KB）。例如：'XADD mystream * field1 value1' 然后 'XADD mystream * field2 value2'。
   ```
2. ```
   运行 'CONFIG SET stream-node-max-bytes 65536' 允许 64KB 条目，然后重试 XADD。
   ```

## 无效尝试

- **** — Only masks the issue; large entries cause memory fragmentation and slow replication. (65% 失败率)
- **** — The entry remains too large; retry will fail repeatedly. (95% 失败率)
- **** — Removes protection; can lead to out-of-memory crashes and replication lag. (80% 失败率)
