{"record":{"id":"787f599df4ec6003","repo":"influxdata/influxdb","slug":"max-request-size-0-bytes-exceeded","errorCode":null,"errorMessage":"max request size ({0} bytes) exceeded","messagePattern":"max request size \\((.+?) bytes\\) exceeded","errorType":"http","errorClass":"Error::RequestSizeExceeded","httpStatus":null,"severity":"error","filePath":"influxdb3_server/src/http.rs","lineNumber":224,"sourceCode":"\n    /// The `Content-Type` header is invalid and cannot be read.\n    #[error(\"invalid content-type header: {0}\")]\n    NonUtf8ContentTypeHeader(hyper::header::ToStrError),\n\n    /// The specified `Content-Encoding` is not acceptable.\n    #[error(\"unacceptable content-encoding: {0}\")]\n    InvalidContentEncoding(String),\n\n    /// The specified `Content-Type` is not acceptable.\n    #[error(\"unacceptable content-type, expected: {expected}\")]\n    InvalidContentType { expected: mime::Mime },\n\n    /// The client disconnected.\n    #[error(\"client disconnected\")]\n    ClientHangup(Box<dyn std::error::Error + Send + Sync>),\n\n    /// The client sent a request body that exceeds the configured maximum.\n    #[error(\"max request size ({0} bytes) exceeded\")]\n    RequestSizeExceeded(usize),\n\n    /// Decoding a gzip-compressed stream of data failed.\n    #[error(\"error decoding gzip stream: {0}\")]\n    InvalidGzip(std::io::Error),\n\n    #[error(\"invalid mime type ({0})\")]\n    InvalidMimeType(String),\n\n    /// DatabaseName validation error.\n    #[error(\"error validating database name: {0}\")]\n    InvalidDatabaseName(#[from] DatabaseNameError),\n\n    /// Failure to decode the provided line protocol.\n    #[error(\"failed to parse line protocol: {0}\")]\n    ParseLineProtocol(influxdb_line_protocol::Error),\n\n    /// The router is currently servicing the maximum permitted number of","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_server/src/http.rs#L206-L242","documentation":"`Error::RequestSizeExceeded` is returned when the client sends a request body larger than the server's configured maximum; the message includes the byte limit. This protects the server from unbounded memory use when buffering bodies.","triggerScenarios":"POSTing a very large line-protocol batch or query payload that exceeds `max_request_size` (the server's configured body-size cap), e.g. bulk-loading a multi-hundred-MB file in a single request.","commonSituations":"Bulk data migrations sent as one giant request, misconfigured max body size on the server (default too low for your batch sizes), or compression failing so the raw payload is sent instead of the gzip stream.","solutions":["Split the payload into smaller batches and send multiple requests","Increase the server's maximum request size configuration option and restart","Enable gzip Content-Encoding on the client to shrink the transmitted body below the cap","Check that the client isn't accidentally double-counting or resending buffered data"],"exampleFix":"// before\nclient.post(url).body(entire_1gb_file) // > max_request_size\n// after\nfor chunk in chunks(entire_1gb_file, 10_000_000) {\n    client.post(url).body(chunk).send()?;\n}","handlingStrategy":"validation","validationCode":"if (Buffer.byteLength(payload) > 10_000_000) throw new Error('split batch before send: exceeds 10MB limit');","typeGuard":null,"tryCatchPattern":"try { await send(batch); } catch (e) { if (String(e).includes('max request size')) { for (const part of split(batch)) await send(part); } else throw e; }","preventionTips":["Batch writes below the configured max request size","Configure max_request_size to match your workload on the server","Use gzip compression to shrink large payloads","Monitor batch sizes in producers with a hard cap"],"tags":["http","payload","limits"],"backgroundTag":"payload-too-large","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}