err:user:bad_request:request_body_too_large- Unkey API: every endpoint accepts at most 10 MiB (10485760 bytes).
- Compute gateway: a request that matches an OpenAPI validation policy can have at most 4 MiB (4194304 bytes). Requests without that policy stream to your app and are not limited.
Example response
Likely causes
- Large
metaobjects on keys or identities. - A
keys.migrateKeysbatch that’s too big. - A body over 4 MiB sent to a Compute route with an OpenAPI validation policy.
How to fix
- Send less in one request. Keep bulky data on your side and store a reference in
meta. - Split
keys.migrateKeysbatches into smaller requests. - For a Compute app, send bodies over 4 MiB to a route that has no OpenAPI validation policy.
Related errors
err:user:bad_request:request_body_unreadable: the body couldn’t be read for a reason other than size.err:unkey:application:invalid_input: a field exceeds its own limit.