OriginChainDB
Errors

413 - request body too large

← Errors examples

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.

Split a request to fit its actual route limitLimits differ by route; count the encoded request bytes rather than the number of records alone.
  1. Measure the encoded bodyInclude the JSON and request format overhead.
  2. Check the route limitUse the documented cap for this endpoint.
  3. Send smaller batchesKeep each body below the limit.
  4. 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.json

Read 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

  1. Measure the encoded request size.
  2. Split the data into smaller batches.
  3. Keep each batch below the request limit.
  4. 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.

© 2026 Silicoyn Technologies Pvt Ltd

On this page