ERM redis data_error ai_generated true

ERR stream entry size exceeds server limits

ID: redis/stream-entry-too-large

Also available as: JSON · Markdown · 中文
88%Fix Rate
85%Confidence
1Evidence
2024-03-15First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
7.0 active
7.2 active
7.4 active

Root Cause

A single stream entry exceeds the configured stream-node-max-bytes limit, preventing insertion.

generic

中文

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

Official Documentation

https://redis.io/docs/latest/commands/xadd/

Workarounds

  1. 92% success Break the data into multiple stream entries, each under stream-node-max-bytes (default 4KB). Example: 'XADD mystream * field1 value1' then 'XADD mystream * field2 value2'.
    Break the data into multiple stream entries, each under stream-node-max-bytes (default 4KB). Example: 'XADD mystream * field1 value1' then 'XADD mystream * field2 value2'.
  2. 85% success Run 'CONFIG SET stream-node-max-bytes 65536' to allow 64KB entries, then retry XADD.
    Run 'CONFIG SET stream-node-max-bytes 65536' to allow 64KB entries, then retry XADD.

中文步骤

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

Dead Ends

Common approaches that don't work:

  1. 65% fail

    Only masks the issue; large entries cause memory fragmentation and slow replication.

  2. 95% fail

    The entry remains too large; retry will fail repeatedly.

  3. 80% fail

    Removes protection; can lead to out-of-memory crashes and replication lag.