Skip to content

Commit 2cac379

Browse files
authored
Merge pull request #104363 from LauraBrenner/larua-batch-retry
Laura batch retry
2 parents 879c8c4 + fd2d949 commit 2cac379

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

articles/batch/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@
123123
href: large-number-tasks.md
124124
- name: Check for job and task errors
125125
href: batch-job-task-error-checking.md
126+
- name: Detecting and handling Batch service errors
127+
href: batch-retry-after-errors.md
126128
- name: Create resource files
127129
href: resource-files.md
128130
- name: Persist job and task output
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: Retrying tasks after an error
3+
description: Check for errors and retry them.
4+
services: batch
5+
documentationcenter: .net
6+
author: LauraBrenner
7+
manager: evansma
8+
editor: ''
9+
tags: azure-batch
10+
11+
ms.assetid: 16279b23-60ff-4b16-b308-5de000e4c028
12+
ms.service: batch
13+
ms.topic: article
14+
ms.tgt_pltfrm:
15+
ms.workload: big-compute
16+
ms.date: 02/15/2020
17+
ms.author: labrenne
18+
ms.custom: seodec18
19+
---
20+
21+
# Detecting and handling Batch service errors
22+
23+
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.
24+
25+
## Common errors
26+
27+
- Networking failures - these are requests that never reached Batch or the Batch response didn't reach the client in time.
28+
- Internal server errors - these are standard 5xx status code HTTP response.
29+
- Throttling can cause errors such as 429 or 503 status code HTTP responses with the Retry-after header.
30+
- 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.
31+
32+
## When to retry
33+
34+
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.
35+
36+
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.
37+
38+
39+
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).

0 commit comments

Comments
 (0)