Skip to content

Commit b419066

Browse files
Document workflow termination for gRPC message size limit errors (#4009)
Co-authored-by: promptless[bot] <179508745+promptless[bot]@users.noreply.github.com> Co-authored-by: Lenny Chen <55669665+lennessyy@users.noreply.github.com>
1 parent 54ec321 commit b419066

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

docs/references/errors.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,18 @@ A retry will be scheduled if the error is recoverable.
192192

193193
{/* TODO: more info */}
194194

195+
## gRPC Message Too Large {#grpc-message-too-large}
196+
197+
This error occurs when the Workflow Task response exceeds the gRPC message size limit of 4 MB.
198+
The Workflow Execution is automatically terminated because this is a non-recoverable error.
199+
200+
This typically happens when a Workflow schedules too many Activities, Child Workflows, or commands in a single Workflow Task, or when a Workflow returns a large result.
201+
202+
To resolve this error, fix your Workflow code and start a new Workflow Execution.
203+
Break work into smaller batches, reduce the size of Workflow returns, use Continue-As-New for long-running Workflows, or compress large payloads with a custom Payload Codec.
204+
205+
See the [BlobSizeLimitError troubleshooting guide](/troubleshooting/blob-size-limit-error) for detailed resolution strategies.
206+
195207
## Nondeterminism Error {#non-deterministic-error}
196208

197209
The [Workflow Task](/tasks#workflow-task) failed due to a [nondeterminism error](/workflow-definition#non-deterministic-change).

docs/troubleshooting/blob-size-limit-error.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,15 @@ There are multiple strategies you can use to avoid this error:
4545
3. Consider offloading large payloads to an object store to reduce the risk of exceeding blob size limits:
4646
1. Pass references to the stored payloads within the Workflow instead of the actual data.
4747
2. Retrieve the payloads from the object store when needed during execution.
48+
49+
## Workflow termination due to oversized response
50+
51+
When a Workflow Task response exceeds the 4 MB gRPC message size limit, Temporal automatically terminates the Workflow Execution. This is a non-recoverable error. The Workflow can't progress if it generates a response that's too large, so retrying won't help.
52+
53+
This typically happens when a Workflow schedules too many Activities, Child Workflows, or other commands in a single Workflow Task. The total size of all commands generated by the Workflow Task must fit within the 4 MB limit.
54+
55+
If your Workflow was terminated for this reason, you'll see a `WorkflowExecutionTerminated` event in the Event History with the cause `WORKFLOW_TASK_FAILED_CAUSE_GRPC_MESSAGE_TOO_LARGE`.
56+
57+
To prevent this, use the batching strategies described above to split work across multiple Workflow Tasks instead of scheduling everything at once.
58+
59+
See the [gRPC Message Too Large error reference](/references/errors#grpc-message-too-large) for more details.

0 commit comments

Comments
 (0)