{"record":{"id":"5c456d60649057a2","repo":"cube-js/cube","slug":"network-message-too-large-bytes","errorCode":null,"errorMessage":"network message too large, {} bytes","messagePattern":"network message too large, (.+?) bytes","errorType":"exception","errorClass":"std::io::Error (ErrorKind::Other)","httpStatus":null,"severity":"error","filePath":"rust/cubestore/cubestore/src/cluster/message.rs","lineNumber":102,"sourceCode":"    pub async fn maybe_send(&self, socket: &mut TcpStream) -> Result<bool, CubeError> {\n        match self.send_impl(socket).await {\n            Ok(()) => Ok(true),\n            Err(e) if e.kind() == std::io::ErrorKind::ConnectionReset => Ok(false),\n            Err(e) => Err(e.into()),\n        }\n    }\n\n    pub async fn send(&self, socket: &mut TcpStream) -> Result<(), CubeError> {\n        Ok(self.send_impl(socket).await?)\n    }\n\n    async fn send_impl(&self, socket: &mut TcpStream) -> Result<(), std::io::Error> {\n        let mut ser = flexbuffers::FlexbufferSerializer::new();\n        self.serialize(&mut ser).unwrap();\n        let message_buffer = ser.take_buffer();\n        let len = message_buffer.len() as u64;\n        if MAX_NETWORK_MSG_LEN < len {\n            return Err(std::io::Error::new(\n                ErrorKind::Other,\n                format!(\"network message too large, {} bytes\", len),\n            ));\n        }\n        // magic number\n        socket.write_u32(MAGIC).await?;\n        socket.write_u32(NETWORK_MESSAGE_VERSION).await?;\n        socket.write_u64(len).await?;\n        socket.write_all(message_buffer.as_slice()).await?;\n        Ok(())\n    }\n\n    pub async fn receive(socket: &mut TcpStream) -> Result<Self, CubeError> {\n        match Self::maybe_receive(socket).await? {\n            Some(m) => Ok(m),\n            None => Err(CubeError::user(\"Connection closed unexpectedly. Please check your worker and meta connection environment variables.\".to_string())),\n        }\n    }","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/rust/cubestore/cubestore/src/cluster/message.rs#L84-L120","documentation":"A Cube Store cluster node refused to send a network message: after flexbuffers serialization, the message's total size exceeds the transport's maximum message size limit, so send_impl aborts rather than shipping an oversized frame. The byte count in the message is the serialized size, which is the number to compare against CUBESTORE_TRANSPORT_MAX_MESSAGE_SIZE.","triggerScenarios":"Thrown at rust/cubestore/cubestore/src/cluster/message.rs:102 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Raise CUBESTORE_TRANSPORT_MAX_MESSAGE_SIZE (and CUBESTORE_TRANSPORT_MAX_FRAME_SIZE) on all Cube Store nodes in the cluster","Reduce the data being shipped — split large pre-aggregation loads or result batches into smaller chunks"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}