{"record":{"id":"2826e97a2fb0d728","repo":"cube-js/cube","slug":"request-of-bytes-exceeds-the-maximum-message-si","errorCode":null,"errorMessage":"Request of {} bytes exceeds the maximum message size of {} bytes. Reduce the size of the query, e.g. by sending fewer or smaller inline tables, or raise CUBESTORE_TRANSPORT_MAX_MESSAGE_SIZE.","messagePattern":"Request of (.+?) bytes exceeds the maximum message size of (.+?) bytes\\. Reduce the size of the query, e\\.g\\. by sending fewer or smaller inline tables, or raise CUBESTORE_TRANSPORT_MAX_MESSAGE_SIZE\\.","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"rust/cubestore/cubestore/src/http/mod.rs","lineNumber":526,"sourceCode":"                                            let message_buffer = msg.into_bytes();\n                                            let http_message = match root_as_http_message(&message_buffer) {\n                                                Err(e) => {\n                                                    error!(\"Websocket message deserialization error: {:?}\", e);\n                                                    continue;\n                                                },\n                                                Ok(http_message) => http_message,\n                                            };\n\n                                            let message_id = http_message.message_id();\n                                            let connection_id = http_message.connection_id().map(|s| s.to_string());\n\n                                            // Refused here rather than by the transport so the\n                                            // answer can name the message it belongs to and the\n                                            // connection survives for everything else in flight\n                                            // on it. See TRANSPORT_SIZE_HEADROOM.\n                                            if message_buffer.len() > max_message_size {\n                                                let error = format!(\n                                                    \"Request of {} bytes exceeds the maximum message size of {} bytes. Reduce the size of the query, e.g. by sending fewer or smaller inline tables, or raise CUBESTORE_TRANSPORT_MAX_MESSAGE_SIZE.\",\n                                                    message_buffer.len(), max_message_size\n                                                );\n                                                error!(\"Websocket message too large: {}\", error);\n                                                let send_res = web_socket.send(\n                                                    Message::binary(HttpMessage { message_id, connection_id, command: HttpCommand::Error { error } }.bytes())\n                                                ).await;\n                                                if let Err(e) = send_res {\n                                                    error!(\"Websocket message send error: {:?}\", e)\n                                                }\n                                                continue;\n                                            }\n\n                                            match HttpMessage::read(http_message).await {\n                                                Err(e) => {\n                                                    error!(\"Websocket message read error: {:?}\", e);\n\n                                                    let send_res = web_socket.send(\n                                                        Message::binary(HttpMessage { message_id, connection_id, command: HttpCommand::Error { error: e.to_string() } }.bytes())","sourceCodeStart":508,"sourceCodeEnd":544,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/rust/cubestore/cubestore/src/http/mod.rs#L508-L544","documentation":"Cube Store's WebSocket HTTP transport checks each incoming message against CUBESTORE_TRANSPORT_MAX_MESSAGE_SIZE and replies with a per-message Error frame (naming the failed message) rather than killing the connection, so other in-flight messages survive.","triggerScenarios":"A client sends a request frame over the Cube Store WebSocket whose byte length exceeds the server's max_message_size — e.g. queries carrying large inline tables.","commonSituations":"Client CUBEJS_CUBESTORE_MAX_MESSAGE_SIZE raised above the server's CUBESTORE_TRANSPORT_MAX_MESSAGE_SIZE, large batch inserts/upload payloads, defaults stricter than the workload needs.","solutions":["Raise CUBESTORE_TRANSPORT_MAX_MESSAGE_SIZE on the Cube Store side to match client limits.","Reduce the request size: smaller inline tables, chunked sends.","Keep client and server size limits consistent (client limit should be <= server limit)."],"exampleFix":"// before\nCUBESTORE_TRANSPORT_MAX_MESSAGE_SIZE=1073741824  # client raised to 4GB, server still 1GB\n// after\nCUBESTORE_TRANSPORT_MAX_MESSAGE_SIZE=4294967296","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Client side: handle the Error frame for the failed message id\nmatch msg {\n  HttpCommand::Error { error, .. } if error.contains(\"exceeds the maximum message size\") => {\n    // chunk the request or raise CUBESTORE_TRANSPORT_MAX_MESSAGE_SIZE\n  }\n  _ => {}\n}","preventionTips":["Align CUBESTORE_TRANSPORT_MAX_MESSAGE_SIZE with client limits","Split large uploads into smaller messages","Watch Cube Store logs for 'Websocket message too large'"],"tags":["cubestore","rust","websocket","message-size"],"backgroundTag":"message-size-exceeded","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}