cube-js/cube · error · std::io::Error (ErrorKind::Other)
network message too large, {} bytes
Error message
network message too large, {} bytes What it means
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.
Source
Thrown at rust/cubestore/cubestore/src/cluster/message.rs:102
pub async fn maybe_send(&self, socket: &mut TcpStream) -> Result<bool, CubeError> {
match self.send_impl(socket).await {
Ok(()) => Ok(true),
Err(e) if e.kind() == std::io::ErrorKind::ConnectionReset => Ok(false),
Err(e) => Err(e.into()),
}
}
pub async fn send(&self, socket: &mut TcpStream) -> Result<(), CubeError> {
Ok(self.send_impl(socket).await?)
}
async fn send_impl(&self, socket: &mut TcpStream) -> Result<(), std::io::Error> {
let mut ser = flexbuffers::FlexbufferSerializer::new();
self.serialize(&mut ser).unwrap();
let message_buffer = ser.take_buffer();
let len = message_buffer.len() as u64;
if MAX_NETWORK_MSG_LEN < len {
return Err(std::io::Error::new(
ErrorKind::Other,
format!("network message too large, {} bytes", len),
));
}
// magic number
socket.write_u32(MAGIC).await?;
socket.write_u32(NETWORK_MESSAGE_VERSION).await?;
socket.write_u64(len).await?;
socket.write_all(message_buffer.as_slice()).await?;
Ok(())
}
pub async fn receive(socket: &mut TcpStream) -> Result<Self, CubeError> {
match Self::maybe_receive(socket).await? {
Some(m) => Ok(m),
None => Err(CubeError::user("Connection closed unexpectedly. Please check your worker and meta connection environment variables.".to_string())),
}
}View on GitHub (pinned to 7d981676b3)
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at rust/cubestore/cubestore/src/cluster/message.rs:102 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/5c456d60649057a2.
Report an issue: GitHub.