Errors
413 - request body too large
What happened
The request body exceeds the limit accepted by the receiving endpoint or gateway. The response below illustrates an 8 MiB limit; it is not the current limit for every route. The row API limits distinguish an 8 MiB single-row body from a 64 MiB JSON batch.
- Measure the encoded bodyInclude the JSON and request format overhead.
- Check the route limitUse the documented cap for this endpoint.
- Send smaller batchesKeep each body below the limit.
- Track each responseRecord which batches succeeded before proceeding.
Request that triggers it
A bulk insert whose encoded file exceeds the actual limit on its request path. Do not expect the example 8 MiB response from a batch endpoint configured with a larger limit.
curl -X POST "https://$OC_HOST/v1/tenants/$OC_TENANT/rows/shop.products/_batch" \
-H "Authorization: Bearer $OC_TOKEN" \
-H "Content-Type: application/json" \
--data-binary @huge-batch.jsonRead the response
{
"error": "payload_too_large",
"message": "request body 12.4 MiB exceeds limit of 8 MiB",
"retry": false,
"limit_bytes": 8388608
}Fix the request
- Measure the encoded request size.
- Split the data into smaller batches.
- Keep each batch below the request limit.
- Track each batch result before continuing.
Keep in mind: Use the current endpoint limits and SDK behavior; do not assume every SDK chunks requests automatically.
Common causes
- A single batch insert containing every record from a CSV dump.
- Rows that include large base64-encoded blobs (images, PDFs).
- Wide vector embeddings on many rows (768-dim float32 = 3 KiB per row before JSON overhead).
- A debug payload that accidentally inlined a stack trace or a large log fragment.
- Forgetting to paginate an upstream source.
Continue
See error handling and retries, or return to error examples.