WorkflowTaskCompletionTooLarge
extends ServerException
in package
The Server refused a workflow-task completion because the whole request is over its completion size limit (413 `payload_too_large`, `limit_kind: workflow_task_completion_bytes`, Server 3.6.0).
The refusal happens before the Server reads the completion, so nothing was
recorded and the task lease is unchanged. Sending the same completion again
gets the same refusal: replaying the task produces the same commands. The
worker fails the run instead with a Structural limit exceeded: failure.
Table of Contents
Constants
- GUIDANCE : mixed = 'Split the fan-out into smaller batches, move w...
- LIMIT_KIND : mixed = 'workflow_task_completion_bytes'
- REASON : mixed = 'payload_too_large'
- SERVER_MESSAGE_MAX_BYTES : mixed = 512
- The most bytes of the Server's message kept on this error and in its logs.
Properties
- $details : array<string|int, mixed>|null
- $limitBytes : int|null
- $reason : string|null
- $serverMessage : string
- $sizeBytes : int
- $status : int
Methods
- __construct() : mixed
- failWorkflowCommand() : array{type: "fail_workflow", message: string, exception_type: string, non_retryable: true}
- The `fail_workflow` command that ends the run with a structural-limit failure.
- fromResponse() : self
- isActivityCompletionPayloadDiscoveryUnavailable() : bool
- Discovery failed before any activity-completion request was submitted.
- isActivityTaskBackendUnavailable() : bool
- A backend failure whose activity completion can be retried with the same attempt and lease.
- isStorageAdmissionFailure() : bool
- Whether the Server explicitly refused admission and requested a same-identity retry.
- isTransientConnectionFailure() : bool
- isTransientUpstreamFailure() : bool
- A temporary upstream HTTP failure without a Server protocol envelope.
- isWorkflowTaskBackendUnavailable() : bool
- A backend failure whose workflow-task mutation can be retried with the same lease fence.
- isWorkflowTaskCompletionDeferred() : bool
- A completion explicitly deferred before commit, under the original lease.
- isWorkflowTaskCompletionPublicationDeferred() : bool
- A committed completion whose publication needs same-fence reconciliation.
- matches() : bool
- The typed refusal, recognized only by its status, reason and limit kind.
- capped() : string
- The Server's message cut to SERVER_MESSAGE_MAX_BYTES at a UTF-8 character boundary.
Constants
GUIDANCE
public
mixed
GUIDANCE
= 'Split the fan-out into smaller batches, move work into child workflows, or continue-as-new; ' . 'offload large payloads with external payload storage.'
LIMIT_KIND
public
mixed
LIMIT_KIND
= 'workflow_task_completion_bytes'
REASON
public
mixed
REASON
= 'payload_too_large'
SERVER_MESSAGE_MAX_BYTES
The most bytes of the Server's message kept on this error and in its logs.
public
mixed
SERVER_MESSAGE_MAX_BYTES
= 512
Properties
$details read-only
public
array<string|int, mixed>|null
$details
= null
$limitBytes read-only
public
int|null
$limitBytes
$reason read-only
public
string|null
$reason
= null
$serverMessage read-only
public
string
$serverMessage
$sizeBytes read-only
public
int
$sizeBytes
$status read-only
public
int
$status
Methods
__construct()
public
__construct(int|null $limitBytes, int $sizeBytes, string $serverMessage, array<string, mixed> $details[, Throwable|null $previous = null ]) : mixed
Parameters
- $limitBytes : int|null
-
the Server's completion limit (
limit), when it sent one - $sizeBytes : int
-
the encoded size of the completion this SDK sent
- $serverMessage : string
- $details : array<string, mixed>
-
the Server's response body
- $previous : Throwable|null = null
failWorkflowCommand()
The `fail_workflow` command that ends the run with a structural-limit failure.
public
failWorkflowCommand() : array{type: "fail_workflow", message: string, exception_type: string, non_retryable: true}
The Server records failure_category: structural_limit for a message with
this prefix.
Return values
array{type: "fail_workflow", message: string, exception_type: string, non_retryable: true}fromResponse()
public
static fromResponse(array<string, mixed> $details, int $sizeBytes[, Throwable|null $previous = null ]) : self
Parameters
- $details : array<string, mixed>
- $sizeBytes : int
- $previous : Throwable|null = null
Return values
selfisActivityCompletionPayloadDiscoveryUnavailable()
Discovery failed before any activity-completion request was submitted.
public
isActivityCompletionPayloadDiscoveryUnavailable(string $taskId, string $attemptId, string $leaseOwner) : bool
Parameters
- $taskId : string
- $attemptId : string
- $leaseOwner : string
Return values
boolisActivityTaskBackendUnavailable()
A backend failure whose activity completion can be retried with the same attempt and lease.
public
isActivityTaskBackendUnavailable(string $taskId, string $attemptId, string $leaseOwner) : bool
Parameters
- $taskId : string
- $attemptId : string
- $leaseOwner : string
Return values
boolisStorageAdmissionFailure()
Whether the Server explicitly refused admission and requested a same-identity retry.
public
isStorageAdmissionFailure([string|null $pollRequestId = null ]) : bool
Parameters
- $pollRequestId : string|null = null
Return values
boolisTransientConnectionFailure()
public
isTransientConnectionFailure() : bool
Return values
boolisTransientUpstreamFailure()
A temporary upstream HTTP failure without a Server protocol envelope.
public
isTransientUpstreamFailure() : bool
Return values
boolisWorkflowTaskBackendUnavailable()
A backend failure whose workflow-task mutation can be retried with the same lease fence.
public
isWorkflowTaskBackendUnavailable(string $taskId, string $leaseOwner, int $attempt[, string $operation = 'heartbeat_workflow_task' ]) : bool
Parameters
- $taskId : string
- $leaseOwner : string
- $attempt : int
- $operation : string = 'heartbeat_workflow_task'
Return values
boolisWorkflowTaskCompletionDeferred()
A completion explicitly deferred before commit, under the original lease.
public
isWorkflowTaskCompletionDeferred(string $taskId, string $leaseOwner, int $attempt) : bool
Parameters
- $taskId : string
- $leaseOwner : string
- $attempt : int
Return values
boolisWorkflowTaskCompletionPublicationDeferred()
A committed completion whose publication needs same-fence reconciliation.
public
isWorkflowTaskCompletionPublicationDeferred(string $taskId, string $leaseOwner, int $attempt) : bool
Parameters
- $taskId : string
- $leaseOwner : string
- $attempt : int
Return values
boolmatches()
The typed refusal, recognized only by its status, reason and limit kind.
public
static matches(int $status, mixed $details) : bool
Parameters
- $status : int
- $details : mixed
Return values
boolcapped()
The Server's message cut to SERVER_MESSAGE_MAX_BYTES at a UTF-8 character boundary.
private
static capped(string $message) : string
Parameters
- $message : string