Skip to main content

output_too_large

HTTP 422 · code: "output_too_large" · type: https://docs.formfeed.dev/errors/output-too-large

The render produced more than it may: the finished file is larger than the plan's limit for one output, or the HTML a template produced is larger than 20 MB. The render is recorded as failed, no file is stored, and it costs nothing. detail gives both sizes in bytes.

PlanLargest output
Free10 MB
Starter50 MB
Pro100 MB
Business250 MB

No output can be larger than 250 MB, whatever the plan.

Example​

{
"type": "https://docs.formfeed.dev/errors/output-too-large",
"title": "Output too large",
"status": 422,
"detail": "Output is 61234567 bytes; the limit is 52428800 bytes",
"code": "output_too_large",
"location": null,
"render_id": "rnd_7da09ab6cd9946b798c187c2a9350852",
"request_id": "req_4b7c1e9a2f3d4c5b8a6e7f9012"
}

For the HTML of a template, detail reads Rendered HTML is 22017321 bytes; the limit is 20971520 bytes.

Common causes​

  • Large images embedded at full resolution, especially as data URIs.
  • A template that produces more than 20 MB of HTML, usually a very long table.
  • A merge or post.merge_after whose documents add up to more than the limit.
  • An e-invoice or a PDF/UA-1 file too large for the validator (The PDF is too large to be made an e-invoice).

A Word or PowerPoint template that grows too large while it is filled answers office_document_too_large instead, and html sent in a request is limited to 5 MB before anything is rendered (invalid_request).

How to fix it​

  • Scale and compress images before you reference them; the image helper sets the display size, not the file size.
  • Split very large documents into several renders.
  • Upgrade the plan for a larger limit. See Plan limits.

Retry?​

No. The same request gets the same answer. Change the data, the template or the plan first, then send the request again with a new Idempotency-Key or without one: a 4xx answer is stored under its key for 24 hours, so the old key returns this problem again. See retrying.