Skip to content

Commit 37b465f

Browse files
committed
update
1 parent b8555d1 commit 37b465f

File tree

1 file changed

+23
-33
lines changed

1 file changed

+23
-33
lines changed

articles/azure-resource-manager/troubleshooting/error-job-size-exceeded.md

Lines changed: 23 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Job size exceeded error
33
description: Describes how to troubleshoot errors for job size exceeded or if the template is too large for deployments using a Bicep file or Azure Resource Manager template (ARM template).
44
ms.topic: troubleshooting
55
ms.custom: devx-track-bicep, devx-track-arm-template
6-
ms.date: 11/07/2024
6+
ms.date: 11/11/2024
77
---
88

99
# Resolve errors for job size exceeded
@@ -30,34 +30,18 @@ Other template limits are:
3030
- 64 output values
3131
- 24,576 characters in a template expression
3232

33-
## Solution 1: Use dependencies carefully
33+
## Solution 1: Reduce name size
3434

3535
# [Bicep](#tab/bicep)
3636

37-
Use an [implicit dependency](../bicep/resource-dependencies.md#implicit-dependency) that's created when a resource references another resource by its symbolic name. For most deployments, it's not necessary to use `dependsOn` and create an [explicit dependency](../bicep/resource-dependencies.md#explicit-dependency).
37+
Try to shorten the length of the names you use for [parameters](../bicep/parameters.md), [variables](../bicep/variables.md), and [outputs](../bicep/outputs.md). When these values are repeated in loops, a long name gets multiplied many times.
3838

3939
# [JSON](#tab/json)
4040

41-
When using [copy](../templates/copy-resources.md) loops to deploy resources, don't use the loop name as a dependency:
42-
43-
```json
44-
dependsOn: [ "nicLoop" ]
45-
```
46-
47-
Instead, use the instance of the resource from the loop that you need to depend on. For example:
48-
49-
```json
50-
dependsOn: [
51-
"[resourceId('Microsoft.Network/networkInterfaces', concat('nic-', copyIndex()))]"
52-
]
53-
```
41+
Try to shorten the length of the names you use for [parameters](../templates/parameters.md), [variables](../templates/variables.md), and [outputs](../templates/outputs.md). When these values are repeated through copy loops, a long name gets multiplied many times.
5442

5543
---
5644

57-
Complex dependencies (a loop of n resources depending on a loop of n resources leads to us storing O(n * n) data rather each resource in a loop depending on its counterpart in the previous loop (O(n)). This one is surprising, but it adds up extremely fast.
58-
59-
Complex dependencies can quickly consume the data limits. For example, if a loop of *n* resources depends on another loop of *n* resources, it results in storing *O(n²)* data. By contrast, if each resource in one loop only depends on its counterpart in the other loop, it results in *O(n)* data. This difference may seem subtle, but the storage impact grows very quickly.
60-
6145
## Solution 2: Simplify template
6246

6347
# [Bicep](#tab/bicep)
@@ -66,38 +50,44 @@ When your file deploys lots of different resource types, consider dividing it in
6650

6751
You can set other resources as implicit dependencies, and [get values from the output of modules](../bicep/outputs.md#outputs-from-modules).
6852

53+
Use [template specs](../bicep/template-specs.md) rather than [Bicep modules](../bicep/modules.md). Bicep modules are converted into a single ARM template with nested templates.
54+
6955
# [JSON](#tab/json)
7056

7157
When your template deploys lots of different resource types, consider dividing it into [linked templates](../templates/linked-templates.md). Divide your resource types into logical groups and add a linked template for each group. For example, if you need to deploy lots of networking resources, you can move those resources to a linked template.
7258

7359
You can set other resources as dependent on the linked template, and [get values from the output of the linked template](../templates/linked-templates.md#get-values-from-linked-template).
7460

61+
Use [template specs](../templates/linked-templates.md#template-specs) rather than [nested templates](../templates/linked-templates.md#nested-template).
62+
7563
---
7664

77-
## Solution 3: Reduce name size
65+
## Solution 3: Use dependencies carefully
7866

7967
# [Bicep](#tab/bicep)
8068

81-
Try to shorten the length of the names you use for [parameters](../bicep/parameters.md), [variables](../bicep/variables.md), and [outputs](../bicep/outputs.md). When these values are repeated in loops, a long name gets multiplied many times.
69+
Use an [implicit dependency](../bicep/resource-dependencies.md#implicit-dependency) that's created when a resource references another resource by its symbolic name. For most deployments, it's not necessary to use `dependsOn` and create an [explicit dependency](../bicep/resource-dependencies.md#explicit-dependency).
8270

8371
# [JSON](#tab/json)
8472

85-
Try to shorten the length of the names you use for [parameters](../templates/parameters.md), [variables](../templates/variables.md), and [outputs](../templates/outputs.md). When these values are repeated through copy loops, a long name gets multiplied many times.
86-
87-
---
88-
89-
## Solution 4: Use template specs
90-
91-
# [Bicep](#tab/bicep)
73+
When using [copy](../templates/copy-resources.md) loops to deploy resources, don't use the loop name as a dependency:
9274

93-
Use [template specs](../bicep/template-specs.md) rather than [Bicep modules](../bicep/modules.md). Bicep modules are converted into a single ARM template with nested templates.
75+
```json
76+
dependsOn: [ "nicLoop" ]
77+
```
9478

95-
# [JSON](#tab/json)
79+
Instead, use the instance of the resource from the loop that you need to depend on. For example:
9680

97-
Use [template specs](../templates/linked-templates.md#template-specs) rather than [nested templates](../templates/templates/linked-templates.md#nested-template).
81+
```json
82+
dependsOn: [
83+
"[resourceId('Microsoft.Network/networkInterfaces', concat('nic-', copyIndex()))]"
84+
]
85+
```
9886

9987
---
10088

101-
## Solution 5: Reduce incompressible data
89+
Complex dependencies can quickly consume the data limits. For example, if a loop of *n* resources depends on another loop of *n* resources, it results in storing *O(n²)* data. By contrast, if each resource in one loop only depends on its counterpart in the other loop, it results in *O(n)* data. This difference may seem subtle, but the storage impact grows very quickly.
90+
91+
## Solution 4: Reduce incompressible data
10292

10393
Including large amounts of incompressible data, such as certificates or binaries, or data with a low compression ratio in a template or parameters will quickly consume the size limit.

0 commit comments

Comments
 (0)