{"record":{"id":"7b9eb0eca669b62c","repo":"t8y2/dbx","slug":"zookeeper-request-frame-is-d-bytes-maximum-is-d-7b9eb0","errorCode":null,"errorMessage":"ZooKeeper request frame is %d bytes, maximum is %d","messagePattern":"ZooKeeper request frame is (.+?) bytes, maximum is (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/hive-go/zookeeper_protocol.go","lineNumber":340,"sourceCode":"\tif xid != client.xid {\n\t\treturn nil, fmt.Errorf(\"ZooKeeper response XID %d does not match request XID %d\", xid, client.xid)\n\t}\n\tif _, err := decoder.int64(); err != nil {\n\t\treturn nil, err\n\t}\n\tcode, err := decoder.int32()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif err := zooKeeperError(code); err != nil {\n\t\treturn nil, err\n\t}\n\treturn decoder.remaining(), nil\n}\n\nfunc (client *protocolZooKeeperClient) writeFrame(payload []byte) error {\n\tif len(payload) > zooKeeperMaxFrameSize {\n\t\treturn fmt.Errorf(\"ZooKeeper request frame is %d bytes, maximum is %d\", len(payload), zooKeeperMaxFrameSize)\n\t}\n\tif err := client.connection.SetWriteDeadline(time.Now().Add(client.timeout)); err != nil {\n\t\treturn err\n\t}\n\theader := make([]byte, 4)\n\tbinary.BigEndian.PutUint32(header, uint32(len(payload)))\n\tif err := writeAll(client.connection, header); err != nil {\n\t\treturn err\n\t}\n\treturn writeAll(client.connection, payload)\n}\n\nfunc (client *protocolZooKeeperClient) readFrame() ([]byte, error) {\n\tif err := client.connection.SetReadDeadline(time.Now().Add(client.timeout)); err != nil {\n\t\treturn nil, err\n\t}\n\theader := make([]byte, 4)\n\tif _, err := io.ReadFull(client.connection, header); err != nil {","sourceCodeStart":322,"sourceCodeEnd":358,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/hive-go/zookeeper_protocol.go#L322-L358","documentation":"Returned by protocolZooKeeperClient.writeFrame when an outgoing ZooKeeper request frame exceeds zooKeeperMaxFrameSize bytes. This is a client-side limit before any bytes are written; a request this large usually means an oversized SASL token or an encoding bug rather than normal traffic.","triggerScenarios":"Thrown at agents/drivers/hive-go/zookeeper_protocol.go:340 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reduce the size of the payload being sent (e.g. avoid oversized auth tokens)","Check for pathological input that inflates the encoded request","Report/retry if the cause looks like an encoding bug generating runaway frame sizes"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}