You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
Make it obvious each troubleshooting section is a recommended alert (#5046)
Reading a section on its own, nothing said it corresponded to an alert.
It opened with a bare "Metric:" line, so the threshold, for duration, and
severity existed only in the tables on the alerting page. Anyone arriving
from a firing alert's runbook_url or from search had no way to know what
condition was supposed to have triggered it.
All 20 sections now open with the full alert definition:
**Recommended alert:** temporal_workflow_task_execution_failed with
failure_reason=NonDeterminismError
Fires on any occurrence, held for 1m. Routed Critical by default.
Tune the threshold.
Two sections cover more than one alert, and say so: UNIMPLEMENTED and
INTERNAL are separate alerts on the same metric, and Workflow Task
schedule-to-start has two thresholds.
Each of the three pages also opens by saying every section on it is one of
the recommended alerts, and that if you arrived from a firing alert, the
section you landed on is its runbook.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Duncan Mackenzie <duncanma@duncanmackenzie.net>
Copy file name to clipboardExpand all lines: docs/troubleshooting/execution-failures.mdx
+18-8Lines changed: 18 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,10 @@ tags:
19
19
This guide covers failures that happen while your Workflow and Activity code is running on a Worker: replay mismatches, oversized responses, unhandled exceptions, and Local Activities that outrun the Workflow Task heartbeat timeout.
20
20
It applies to Workers connected to Temporal Cloud and to a self-hosted Temporal Service.
21
21
22
-
For alert thresholds and `for` durations, see [Worker alerting](/best-practices/worker-alerting).
22
+
Every section on this page is one of the recommended alerts in [Worker alerting](/best-practices/worker-alerting).
23
+
Each one opens with the alert definition, explains what the condition costs you, then walks through triage.
24
+
If you got here from a firing alert, the section you landed on is the runbook for it.
25
+
23
26
For metric definitions, see the [Temporal SDK metrics reference](/references/sdk-metrics).
24
27
25
28
[`temporal_workflow_task_execution_failed`](/references/sdk-metrics#workflow_task_execution_failed) carries a `failure_reason` tag along with `namespace`, `task_queue`, and `workflow_type`.
@@ -28,7 +31,8 @@ Alert on each `failure_reason` separately.
**Metric:**`temporal_workflow_task_execution_failed` with `failure_reason=NonDeterminismError`
34
+
**Recommended alert:**`temporal_workflow_task_execution_failed` with `failure_reason=NonDeterminismError`
35
+
Fires on any occurrence, held for 1m. Routed Critical by default. [Tune the threshold](/best-practices/worker-alerting#execution-failures).
32
36
33
37
Replay produced a different sequence of commands than the one recorded in Event History.
34
38
The Worker noticed that the Workflow code it is running no longer matches what the Execution has already done.
@@ -51,7 +55,8 @@ This will not clear up on its own.
51
55
52
56
## gRPC message too large {/* #grpc-message-too-large */}
53
57
54
-
**Metric:**`temporal_workflow_task_execution_failed` with `failure_reason=GrpcMessageTooLarge`
58
+
**Recommended alert:**`temporal_workflow_task_execution_failed` with `failure_reason=GrpcMessageTooLarge`
59
+
Fires on any occurrence, held for 1m. Routed Critical by default. [Tune the threshold](/best-practices/worker-alerting#execution-failures).
55
60
56
61
The Workflow Task response was bigger than the gRPC message size limit.
57
62
The Worker tried `RespondWorkflowTaskCompleted` and something rejected it: the gRPC library on the SDK side, a proxy or load balancer in the path, or the gRPC library on the Temporal Service side when it went to receive.
@@ -84,7 +89,8 @@ Check the Workflow terminate rate on your server dashboard. A spike alongside th
**Metric:**`temporal_workflow_task_execution_failed` with `failure_reason=WorkflowError`
92
+
**Recommended alert:**`temporal_workflow_task_execution_failed` with `failure_reason=WorkflowError`
93
+
Fires when the rate goes above 10/s, held for 2m. Routed Warning by default. [Tune the threshold](/best-practices/worker-alerting#execution-failures).
88
94
89
95
Workflow Tasks are failing steadily from unhandled exceptions and panics in Workflow code that the SDK catches and reports.
90
96
`WorkflowError` is the catch-all reason. It covers thread pool exhaustion, unhandled exceptions thrown inside the Workflow function, and Data Converter errors.
@@ -108,7 +114,8 @@ Unlike `GrpcMessageTooLarge`, the Temporal Service won't terminate the Execution
108
114
109
115
## Workflow Task execution latency high {/* #workflow-task-execution-latency-high */}
110
116
111
-
**Metric:**[`temporal_workflow_task_execution_latency`](/references/sdk-metrics#workflow_task_execution_latency), tagged `namespace`, `task_queue`, and `workflow_type`
117
+
**Recommended alert:**[`temporal_workflow_task_execution_latency`](/references/sdk-metrics#workflow_task_execution_latency), tagged `namespace`, `task_queue`, and `workflow_type`
118
+
Fires when p99 goes above 10s, held for 5m. Routed Critical by default. [Tune the threshold](/best-practices/worker-alerting#execution-failures).
112
119
113
120
Workflow Tasks are taking too long to execute on the Worker.
114
121
The default Workflow Task timeout is 10 seconds, so at or above that value the Temporal Service is actively timing out Workflow Tasks.
@@ -135,7 +142,8 @@ At scale this compounds: more timeouts cause more cold replays, cold replays dri
**Metric:**[`temporal_unregistered_activity_invocation`](/references/sdk-metrics#unregistered_activity_invocation), tagged `activity_type`, `task_queue`, and `workflow_type`
169
+
**Recommended alert:**[`temporal_unregistered_activity_invocation`](/references/sdk-metrics#unregistered_activity_invocation), tagged `activity_type`, `task_queue`, and `workflow_type`
170
+
Fires on any occurrence, held for 1m. Routed Critical by default. Go SDK only. [Tune the threshold](/best-practices/worker-alerting#execution-failures).
162
171
163
172
A Workflow scheduled an Activity that the Worker polling that Task Queue has no registered implementation for.
164
173
@@ -178,7 +187,8 @@ This is nearly always a deployment mistake rather than a runtime condition: Work
178
187
179
188
## Local Activity latency exceeds the heartbeat timeout {/* #local-activity-latency-exceeds-the-heartbeat-timeout */}
Copy file name to clipboardExpand all lines: docs/troubleshooting/request-failures.mdx
+18-8Lines changed: 18 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,10 @@ tags:
19
19
This guide covers gRPC failures and slow requests between your Temporal SDK Workers or Clients and the Temporal Service.
20
20
It applies to Workers connected to Temporal Cloud and to a self-hosted Temporal Service.
21
21
22
-
For alert thresholds and `for` durations, see [Worker alerting](/best-practices/worker-alerting).
22
+
Every section on this page is one of the recommended alerts in [Worker alerting](/best-practices/worker-alerting).
23
+
Each one opens with the alert definition, explains what the condition costs you, then walks through triage.
24
+
If you got here from a firing alert, the section you landed on is the runbook for it.
25
+
23
26
For metric definitions, see the [Temporal SDK metrics reference](/references/sdk-metrics).
24
27
25
28
[`temporal_request_failure`](/references/sdk-metrics#request_failure) increments when the Temporal Service returns a non-OK gRPC status code on a standard operation.
@@ -37,7 +40,8 @@ And `status_code` values are `UPPER_SNAKE_CASE` in every SDK, matching the gRPC
37
40
38
41
## NOT_FOUND on respond operations {/* #not_found-on-respond-operations */}
39
42
40
-
**Metric:**`temporal_request_failure` with `status_code=NOT_FOUND` on `RespondWorkflowTaskCompleted`, `RespondWorkflowTaskFailed`, `RespondActivityTaskCompleted`, or `RespondActivityTaskFailed`
43
+
**Recommended alert:**`temporal_request_failure` with `status_code=NOT_FOUND` on `RespondWorkflowTaskCompleted`, `RespondWorkflowTaskFailed`, `RespondActivityTaskCompleted`, or `RespondActivityTaskFailed`
44
+
Fires on any occurrence, held for 5m. Routed Critical by default. [Tune the threshold](/best-practices/worker-alerting#request-failures).
41
45
42
46
A Worker finished a Workflow Task or Activity Task and reported the result, and the Temporal Service replied that the task no longer exists.
43
47
There are three causes:
@@ -77,7 +81,8 @@ If SDK-side metrics look normal and the Execution was not terminated or timed ou
77
81
78
82
## NOT_FOUND on Activity heartbeat {/* #not_found-on-activity-heartbeat */}
79
83
80
-
**Metric:**`temporal_request_failure` with `status_code=NOT_FOUND` on `RecordActivityTaskHeartbeat`
84
+
**Recommended alert:**`temporal_request_failure` with `status_code=NOT_FOUND` on `RecordActivityTaskHeartbeat`
85
+
Fires on any occurrence, held for 5m. Routed Warning by default, though see the caveat below. [Tune the threshold](/best-practices/worker-alerting#request-failures).
81
86
82
87
A Worker heartbeated a running Activity and the Temporal Service replied that the task no longer exists.
83
88
The Service has already cancelled the in-flight Activity Task: either the `heartbeatTimeout` fired before the next heartbeat call arrived, the `startToClose` timeout expired while the Activity was still executing, or the Workflow Execution is no longer running.
@@ -102,7 +107,8 @@ The Activity will time out on every attempt until you fix the cause, holding Tas
102
107
103
108
## RESOURCE_EXHAUSTED on user-facing operations {/* #resource_exhausted-on-user-facing-operations */}
104
109
105
-
**Metric:**`temporal_request_failure` with `status_code=RESOURCE_EXHAUSTED` on `StartWorkflowExecution`, `SignalWithStartWorkflowExecution`, `SignalWorkflowExecution`, `UpdateWorkflowExecution`, or `ExecuteMultiOperation`
110
+
**Recommended alert:**`temporal_request_failure` with `status_code=RESOURCE_EXHAUSTED` on `StartWorkflowExecution`, `SignalWithStartWorkflowExecution`, `SignalWorkflowExecution`, `UpdateWorkflowExecution`, or `ExecuteMultiOperation`
111
+
Fires on any occurrence, held for 1m. Routed Critical by default. [Tune the threshold](/best-practices/worker-alerting#request-failures).
106
112
107
113
The Temporal Service is throttling the operations your application code uses to start Workflows and deliver Signals and Updates.
108
114
The SDK retries these automatically for up to 60 seconds.
@@ -139,7 +145,8 @@ If the cause is system overload or an open circuit breaker, the Temporal Service
139
145
140
146
## RESOURCE_EXHAUSTED on respond operations {/* #resource_exhausted-on-respond-operations */}
141
147
142
-
**Metric:**`temporal_request_failure` with `status_code=RESOURCE_EXHAUSTED` on `RespondWorkflowTaskCompleted`, `RespondWorkflowTaskFailed`, `RespondActivityTaskCompleted`, or `RespondActivityTaskFailed`
148
+
**Recommended alert:**`temporal_request_failure` with `status_code=RESOURCE_EXHAUSTED` on `RespondWorkflowTaskCompleted`, `RespondWorkflowTaskFailed`, `RespondActivityTaskCompleted`, or `RespondActivityTaskFailed`
149
+
Fires on any occurrence, held for 5m. Routed Critical by default. [Tune the threshold](/best-practices/worker-alerting#request-failures).
143
150
144
151
The Temporal Service is throttling Workers reporting task results.
145
152
The SDK retries automatically, but a delayed respond call has a compounding cost: the Worker holds the Task slot until the call succeeds, and the Service-side task stays in-flight until the response lands.
## RESOURCE_EXHAUSTED on poll operations {/* #resource_exhausted-on-poll-operations */}
167
174
168
-
**Metric:**`temporal_long_request_failure` with `status_code=RESOURCE_EXHAUSTED` on `PollWorkflowTaskQueue` or `PollActivityTaskQueue`
175
+
**Recommended alert:**`temporal_long_request_failure` with `status_code=RESOURCE_EXHAUSTED` on `PollWorkflowTaskQueue` or `PollActivityTaskQueue`
176
+
Fires on any occurrence, held for 5m. Routed Warning by default. [Tune the threshold](/best-practices/worker-alerting#request-failures).
169
177
170
178
The Temporal Service is throttling Worker poll calls.
171
179
Poll operations are long-poll requests, so they increment `temporal_long_request_failure` rather than `temporal_request_failure`.
@@ -193,7 +201,8 @@ Scale Worker capacity first if schedule-to-start latency is the real problem.
193
201
194
202
## UNIMPLEMENTED or INTERNAL from the Temporal Service {/* #unimplemented-or-internal-from-the-temporal-service */}
195
203
196
-
**Metric:**`temporal_request_failure` with `status_code=UNIMPLEMENTED` or `status_code=INTERNAL`, on any operation
204
+
**Recommended alert:**`temporal_request_failure` with `status_code=UNIMPLEMENTED` or `status_code=INTERNAL`, on any operation
205
+
Two alerts, one per status code. Each fires on any occurrence, held for 2m, routed Critical by default. [Tune the threshold](/best-practices/worker-alerting#request-failures).
197
206
198
207
These two status codes point at the Temporal Service rather than at your application, and they behave differently in the SDK.
199
208
Alert on them separately.
@@ -224,7 +233,8 @@ For UNIMPLEMENTED, check that every Frontend, History, and Matching pod is runni
224
233
225
234
## Request latency high on user-facing operations {/* #request-latency-high-on-user-facing-operations */}
226
235
227
-
**Metric:**[`temporal_request_latency`](/references/sdk-metrics#request_latency) on `StartWorkflowExecution`, `SignalWithStartWorkflowExecution`, `SignalWorkflowExecution`, or `ExecuteMultiOperation`
236
+
**Recommended alert:**[`temporal_request_latency`](/references/sdk-metrics#request_latency) on `StartWorkflowExecution`, `SignalWithStartWorkflowExecution`, `SignalWorkflowExecution`, or `ExecuteMultiOperation`
237
+
Fires when p99 goes above 2s, held for 5m. Routed Critical by default. [Tune the threshold](/best-practices/worker-alerting#request-failures).
228
238
229
239
p99 latency on the operations your application calls synchronously has risen above your threshold.
Copy file name to clipboardExpand all lines: docs/troubleshooting/worker-capacity.mdx
+16-7Lines changed: 16 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,10 @@ tags:
21
21
This guide covers what to do when your Workers stop keeping up with their Task Queues: slots that never free up, pollers that quit polling, Tasks sitting in the queue, and a [Sticky Execution](/sticky-execution) cache that isn't earning its keep.
22
22
It applies to Workers connected to Temporal Cloud and to a self-hosted Temporal Service.
23
23
24
-
For alert thresholds and `for` durations, see [Worker alerting](/best-practices/worker-alerting).
24
+
Every section on this page is one of the recommended alerts in [Worker alerting](/best-practices/worker-alerting).
25
+
Each one opens with the alert definition, explains what the condition costs you, then walks through triage.
26
+
If you got here from a firing alert, the section you landed on is the runbook for it.
27
+
25
28
For Worker sizing and tuning, see [Worker performance](/develop/worker-performance) and [Worker deployment and performance](/best-practices/worker).
26
29
27
30
These failure modes are chained together.
@@ -30,7 +33,8 @@ When several fire at once, don't treat them as separate problems. Work backward
Fires when the gauge reaches 0, held for 2m. Routed Critical by default. [Tune the threshold](/best-practices/worker-alerting#worker-capacity).
34
38
35
39
Every Task execution slot for this `worker_type` and Task Queue is occupied, so no new Tasks can be picked up.
36
40
The SDK blocks before issuing its next poll until a slot is released.
@@ -80,7 +84,8 @@ If that goes on past the Workflow Task heartbeat timeout, 30 minutes by default,
80
84
81
85
## All pollers disconnected {/* #all-pollers-disconnected */}
82
86
83
-
**Metric:**[`temporal_num_pollers`](/references/sdk-metrics#num_pollers) reaching 0, tagged `poller_type` and `task_queue`
87
+
**Recommended alert:**[`temporal_num_pollers`](/references/sdk-metrics#num_pollers), tagged `poller_type` and `task_queue`
88
+
Fires when the gauge reaches 0, held for 5m. Routed Critical by default. [Tune the threshold](/best-practices/worker-alerting#worker-capacity).
84
89
85
90
No active pollers remain for this poller type and Task Queue.
86
91
Workers have stopped polling entirely and Tasks are accumulating with nothing to process them.
@@ -117,7 +122,8 @@ A non-zero authorization system failure count means the auth plugin itself is br
117
122
118
123
## Task completions dropped to zero {/* #task-completions-dropped-to-zero */}
119
124
120
-
**Metric:**[`temporal_request`](/references/sdk-metrics#request) rate reaching 0 on `RespondWorkflowTaskCompleted` or `RespondActivityTaskCompleted`
125
+
**Recommended alert:**[`temporal_request`](/references/sdk-metrics#request) on `RespondWorkflowTaskCompleted` or `RespondActivityTaskCompleted`
126
+
Fires when the rate reaches 0 while the Task Queue still has demand, held for 5m. Routed Critical by default. [Tune the threshold](/best-practices/worker-alerting#worker-capacity).
121
127
122
128
The SDK only bumps this counter after a response succeeds, so a zero rate means nothing is landing.
123
129
@@ -153,7 +159,8 @@ Check overall cluster health: service errors by Namespace, persistence availabil
**Metric:**[`temporal_workflow_task_schedule_to_start_latency`](/references/sdk-metrics#workflow_task_schedule_to_start_latency), tagged `namespace` and `task_queue`
162
+
**Recommended alert:**[`temporal_workflow_task_schedule_to_start_latency`](/references/sdk-metrics#workflow_task_schedule_to_start_latency), tagged `namespace` and `task_queue`
163
+
Two alerts at different thresholds. One fires when p99 goes above 5s, the other above 30m. Both held for 5m and routed Critical by default. [Tune the threshold](/best-practices/worker-alerting#worker-capacity).
157
164
158
165
Workflow Tasks are sitting in the queue before a Worker picks them up.
159
166
Alert at two levels: a lower threshold that catches meaningful delay, and a much higher one that catches a stalled Task Queue.
@@ -189,7 +196,8 @@ Then check the server-side concurrent poller count for this Task Queue to see wh
**Metric:**[`temporal_activity_schedule_to_start_latency`](/references/sdk-metrics#activity_schedule_to_start_latency), tagged `namespace` and `task_queue`
199
+
**Recommended alert:**[`temporal_activity_schedule_to_start_latency`](/references/sdk-metrics#activity_schedule_to_start_latency), tagged `namespace` and `task_queue`
200
+
Fires when p99 goes above 30m, held for 5m. Routed Critical by default. [Tune the threshold](/best-practices/worker-alerting#worker-capacity).
193
201
194
202
Activity Tasks are sitting in the queue before a Worker picks them up.
195
203
@@ -216,7 +224,8 @@ Check the approximate Task backlog and the server-side concurrent poller count f
216
224
217
225
## Sticky cache holding zero entries under load {/* #sticky-cache-holding-zero-entries-under-load */}
218
226
219
-
**Metric:**[`temporal_sticky_cache_size`](/references/sdk-metrics#sticky_cache_size) reaching 0 while the Worker is processing Workflow Tasks
Fires when the gauge reaches 0 while the Worker is processing Workflow Tasks, held for 15m. Routed Warning by default. [Tune the threshold](/best-practices/worker-alerting#worker-capacity).
220
229
221
230
This gauge tells you how many Workflow Executions the Worker is holding in its [Sticky Execution](/sticky-execution) cache right now.
0 commit comments