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
Copy file name to clipboardExpand all lines: articles/batch/batch-retry-after-errors.md
+17-27Lines changed: 17 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,17 @@ ms.date: 05/15/2020
9
9
10
10
At times, you may find it necessary to handle both task and application failures within your Batch solution. This article talks about types of errors and how to resolve them.
11
11
12
+
## Error codes
13
+
14
+
General types of errors include:
15
+
16
+
- Networking failures for requests that never reached Batch, or when the Batch response didn't reach the client in time.
17
+
- Internal server errors (standard 5xx status code HTTP response).
18
+
- Throttling-related errors, such as 429 or 503 status code HTTP responses with the Retry-after header.
19
+
- 4xx errors such as AlreadyExists and InvalidOperation. This means that the resource is not in the correct state for the state transition.
20
+
21
+
For detailed information about specific error codes, including error codes for REST API, Batch service, and job task/scheduling, see [Batch Status and Error Codes](https://docs.microsoft.com/rest/api/batchservice/batch-status-and-error-codes).
22
+
12
23
## Application failures
13
24
14
25
During execution, an application might produce diagnostic output that you can use to troubleshoot issues. As described in [Files and directories](files-and-directories.md), the Batch service writes standard output and standard error output to `stdout.txt` and `stderr.txt` files in the task directory on the compute node.
@@ -17,7 +28,7 @@ You can use the Azure portal or one of the Batch SDKs to download these files. F
17
28
18
29
## Task errors
19
30
20
-
Task errors fall into these categories:
31
+
Task errors fall into several categories.
21
32
22
33
### Pre-processing errors
23
34
@@ -84,35 +95,14 @@ In situations where some of your tasks are failing, your Batch client applicatio
84
95
> [!IMPORTANT]
85
96
> With the actions described above, youc can specify how tasks currently running on the node are handled when you perform the action. For example, when you disable task scheduling on a node by using the Batch .NET client library, you can specify a [DisableComputeNodeSchedulingOption](https://docs.microsoft.com/dotnet/api/microsoft.azure.batch.common.disablecomputenodeschedulingoption) enum value to specify whether to **Terminate** running tasks, **Requeue** them for scheduling on other nodes, or allow running tasks to complete before performing the action (**TaskCompletion**).
86
97
87
-
## Next steps
88
-
89
-
- Learn how to [check for pool and node errors](batch-pool-node-error-checking.md).
90
-
- Learn how to [check for job and task errors](batch-job-task-error-checking.md).
91
-
92
-
93
-
94
-
95
-
## This was the old topic. Detecting and handling Batch service errors
96
-
97
-
It is important to remember to check for errors when working with a REST service API. It isn't uncommon for errors to occur when running batch jobs.
98
-
99
-
## Common errors
100
-
101
-
- Networking failures - these are requests that never reached Batch or the Batch response didn't reach the client in time.
102
-
- Internal server errors - these are standard 5xx status code HTTP response.
103
-
- Throttling can cause errors such as 429 or 503 status code HTTP responses with the Retry-after header.
104
-
- 4xx errors that include such errors as AlreadyExists and InvalidOperation. This means that the resource is not in the correct state for the state transition.
105
-
106
-
For detailed information about the various types of error codes and specific error codes, see [Batch Status and Error Codes](https://docs.microsoft.com/rest/api/batchservice/batch-status-and-error-codes).
107
-
108
-
## When to retry
98
+
## Retry after errors
109
99
110
100
The Batch APIs will notify you if there is a failure. They can all be retried, and they all include a global retry handler for that purpose. It is best to use this built-in mechanism.
111
101
112
102
After a failure, you should wait a bit (several seconds between retries) before retrying. If you retry too frequently or too quickly, the retry handler will throttle.
113
103
114
-
### For more information
115
-
116
-
[Batch APIs and tools](batch-apis-tools.md) links to API reference information. The .NET API, for example, has a [RetryPolicyProvider class](https://docs.microsoft.com/dotnet/api/microsoft.azure.batch.retrypolicyprovider?view=azure-dotnet) where the required retry policy should be specified.
104
+
## Next steps
117
105
118
-
For detailed information about each API and their default retry policies, read [Batch Status and Error Codes](https://docs.microsoft.com/rest/api/batchservice/batch-status-and-error-codes).
106
+
- Learn how to [check for pool and node errors](batch-pool-node-error-checking.md).
107
+
- Learn how to [check for job and task errors](batch-job-task-error-checking.md).
108
+
- Review the list of [Batch Status and Error Codes](https://docs.microsoft.com/rest/api/batchservice/batch-status-and-error-codes).
0 commit comments