{"record":{"id":"64b010a9878aa983","repo":"FuelLabs/fuel-core","slug":"failed-to-read-stream-entries-from-redis-node-e","errorCode":null,"errorMessage":"Failed to read stream entries from Redis node: {e}","messagePattern":"Failed to read stream entries from Redis node: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/fuel-core/src/service/adapters/consensus_module/poa.rs","lineNumber":715,"sourceCode":"        let count = u32::try_from(max_entries).unwrap_or(u32::MAX);\n        let stream_entries = timeout(\n            self.node_timeout,\n            redis::Script::new(READ_STREAM_ENTRIES_SCRIPT)\n                .key(&self.block_stream_key)\n                .arg(next_height)\n                .arg(count)\n                .invoke_async::<Vec<(u32, u64, Vec<u8>, String)>>(&mut connection),\n        )\n        .await;\n\n        let entries = match stream_entries {\n            Err(_) => {\n                self.clear_cached_connection(redis_node).await;\n                return Err(anyhow!(\"Timed out reading stream entries from Redis node\"));\n            }\n            Ok(Err(e)) => {\n                self.clear_cached_connection(redis_node).await;\n                return Err(anyhow!(\n                    \"Failed to read stream entries from Redis node: {e}\"\n                ));\n            }\n            Ok(Ok(entries)) => entries,\n        };\n\n        let mut blocks = Vec::new();\n        for (height, epoch, bytes, _stream_id) in entries {\n            match postcard::from_bytes::<SealedBlock>(&bytes) {\n                Ok(block) => blocks.push((height, epoch, block)),\n                Err(e) => {\n                    tracing::warn!(\n                        \"Skipping stream entry: failed to deserialize block at height {height}: {e}\"\n                    );\n                }\n            }\n        }\n","sourceCodeStart":697,"sourceCodeEnd":733,"githubUrl":"https://github.com/FuelLabs/fuel-core/blob/b9d4d170da3a31c9ace5f963d633b326348e0d42/crates/fuel-core/src/service/adapters/consensus_module/poa.rs#L697-L733","documentation":"Same batch-read path (crates/fuel-core/src/service/adapters/consensus_module/poa.rs:715) but Redis answered with an error ({e}) rather than timing out. The node's cached connection is reset and its whole read counts as failed; if the remaining successful reads drop below quorum, the caller aborts with the 'Cannot reconcile' error.","triggerScenarios":"Redis errors during the XRANGE-style batch read: WRONGTYPE on block_stream_key, MISCONF persistence failure, NOAUTH/ACL denial, OOM command rejection under maxmemory, or read-only replica errors.","commonSituations":"Redis maxmemory reached so reads are rejected; disk-full MISCONF state; permission/ACL changes; the stream key overwritten by non-stream data.","solutions":["Act on the {e} payload: free Redis memory (maxmemory) or disk, fix ACL/credentials","Ensure {lease_key}:block:stream is actually a stream (WRONGTYPE → remove the foreign key)","Return the node to a healthy primary state; quorum of remaining nodes keeps the chain alive meanwhile"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// pre-flight server health per node:\n// redis-cli INFO persistence -> rdb_last_bgsave_status:ok\n// redis-cli CONFIG GET maxmemory / maxmemory-policy -> reads must not be rejected\n// redis-cli TYPE <lease_key>:block:stream -> stream","typeGuard":null,"tryCatchPattern":"match read_entries(node, h, n).await {\n    Err(e) if e.to_string().contains(\"Failed to read stream entries\") => {\n        // parse {e}: WRONGTYPE/MISCONF/OOM/NOAUTH each map to a specific op action;\n    }\n    other => other,\n}","preventionTips":["Set maxmemory with headroom and an eviction policy that never rejects stream reads","Monitor disk space on Redis hosts (MISCONF prevention)","Keep ACLs stable; coordinate credential rotation with node restarts"],"tags":["fuel-core","redis","stream","protocol","operations"],"backgroundTag":null,"analyzedSha":"b9d4d170da3a31c9ace5f963d633b326348e0d42","analyzedAt":"2026-08-16T08:56:42.692Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}