RPC error HTTP 413: batch_too_large

Last updated:

At a glance

Error details
PropertyValue
Applies toRobinhood Chain (chain ID 4663)
HTTP status413
Body ceiling4 MiB (4,194,304 bytes)
Raised by planNo — identical for every key

Cause

POST /rpc/robinhood accepts a JSON-RPC object or batch array with a total body size up to 4 MiB (4,194,304 bytes), whitespace included. The limit is identical for every API key and is independent of requests per second, so a large batch or a wide eth_getLogs filter can exceed it while your rate budget is untouched.

Solution

  1. Split the batch into several smaller arrays and send them sequentially.
  2. Remember that a batch of N requests costs N requests against the RPS budget, so splitting does not make it cheaper — it only fits the body limit.
  3. For wide log queries, narrow the block range or the address/topic filter instead of growing the body.

Example

{
  "error": "batch_too_large"
}

FAQ

Does a higher plan raise the 4 MiB limit?
No. The body ceiling is the same on every plan; only request rates differ. Split the batch instead.
Does one batch count as one request?
No. Every element is inspected for method and tier access, and a batch of N requests costs N requests against the RPS budget.