Skip to content

Commit ac2731c

Browse files
committed
error topic
1 parent 423b566 commit ac2731c

File tree

1 file changed

+17
-27
lines changed

1 file changed

+17
-27
lines changed

articles/batch/batch-retry-after-errors.md

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@ ms.date: 05/15/2020
99

1010
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.
1111

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+
1223
## Application failures
1324

1425
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
1728

1829
## Task errors
1930

20-
Task errors fall into these categories:
31+
Task errors fall into several categories.
2132

2233
### Pre-processing errors
2334

@@ -84,35 +95,14 @@ In situations where some of your tasks are failing, your Batch client applicatio
8495
> [!IMPORTANT]
8596
> 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**).
8697
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
10999

110100
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.
111101

112102
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.
113103

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
117105

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

Comments
 (0)