|
|
@@ -358,29 +358,42 @@ failure rather than a silently dropped submission.
|
|
|
|
|
|
### Upload size
|
|
|
|
|
|
+An uploaded file is carried base64-encoded inside the gRPC message the
|
|
|
+webserver sends the runner, not as raw bytes - base64 is 4/3 the size of what
|
|
|
+it encodes, so a 24 MB file becomes roughly a 32 MB request. Keep that
|
|
|
+expansion in mind when sizing any of the limits below against an actual file
|
|
|
+size.
|
|
|
+
|
|
|
Two limits apply on the way in, and a submission has to pass both:
|
|
|
|
|
|
- `server.max_upload_mb` in `config/webserver.json` bounds every request body
|
|
|
the webserver accepts, uploads included - 32 MB by default. Anything larger
|
|
|
- is refused before the form handler ever sees it.
|
|
|
+ is refused before the form handler ever sees it. This is a limit on the
|
|
|
+ HTTP request body, before base64 expansion.
|
|
|
- The runner's own gRPC message-size limit, `max_message_size_mb` in
|
|
|
- `config/runner.json`, bounds the same body again on its way from the
|
|
|
- webserver to the runner as part of the execution payload - 64 MB by default,
|
|
|
- deliberately set above the upload limit so it never re-imposes a lower cap
|
|
|
- than the one already enforced at the HTTP layer.
|
|
|
+ `config/runner.json`, bounds the *base64-encoded* body again on its way
|
|
|
+ from the webserver to the runner as part of the execution payload - 64 MB
|
|
|
+ by default, deliberately set above the upload limit (with room for the
|
|
|
+ base64 expansion) so it never re-imposes a lower cap than the one already
|
|
|
+ enforced at the HTTP layer.
|
|
|
|
|
|
A field's own `maxSizeMb` (see Fields, above) can tighten either of these
|
|
|
further but never raise them.
|
|
|
|
|
|
-The way back is a separate, symmetric limit: every gRPC channel the webserver
|
|
|
-opens to a runner - including the one a `wait`-mode form's execution result
|
|
|
-travels back over - is sized off `server.max_upload_mb` as well (both send and
|
|
|
-receive), not off the runner's `max_message_size_mb`. Before this was wired
|
|
|
-up, that channel used gRPC's own 4 MB default for what it would accept back,
|
|
|
-so a `wait`-mode form whose `respond-to-webhook` body exceeded 4 MB failed
|
|
|
-with "Received message larger than max" even though the request that produced
|
|
|
-it was well inside every limit above. A large response is bounded by
|
|
|
-`server.max_upload_mb` the same as a large request is.
|
|
|
+The way back is a separate limit, and it is deliberately not sized off either
|
|
|
+of the above: every gRPC channel the webserver opens to a runner - including
|
|
|
+the one a `wait`-mode form's execution result travels back over - bounds only
|
|
|
+what the webserver will *receive*, from `server.max_upload_mb`. Before this
|
|
|
+was wired up, that channel used gRPC's own 4 MB default for what it would
|
|
|
+accept back, so a `wait`-mode form whose `respond-to-webhook` body exceeded
|
|
|
+4 MB failed with "Received message larger than max". What the webserver
|
|
|
+*sends* to a runner over that same channel is left at gRPC's default
|
|
|
+(unlimited) on purpose: a send cap taken from `max_upload_mb` would be
|
|
|
+smaller than a base64-encoded upload that `max_upload_mb` itself allows (a
|
|
|
+26 MiB file base64-encodes to about 34.7 MB, over a 32 MB cap), and the two
|
|
|
+limits above already bound what the webserver will accept from a client and
|
|
|
+what the runner will accept from the webserver - a third cap on the way out
|
|
|
+would protect nothing and would only break a documented-legal upload.
|
|
|
|
|
|
### Password
|
|
|
|