Skip to content

Commit 4dd3485

Browse files
author
Simonx Xu
authored
Merge pull request #9140 from AmandaAZ/Branch-CI6188
AB#6188: Runbook job suspended in Azure Automation
2 parents f4924d9 + 393ba4e commit 4dd3485

File tree

3 files changed

+70
-1
lines changed

3 files changed

+70
-1
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: Runbook Jobs Get Suspended in Azure Automation
3+
description: Provides solutions to an issue where runbook jobs are suspended in Azure Automation.
4+
ms.date: 06/24/2025
5+
ms.reviewer: adoyle, v-weizhu
6+
ms.service: azure-automation
7+
ms.custom: sap:Runbook not working as expected
8+
---
9+
# Runbook jobs are suspended in Azure Automation
10+
11+
This article provides solutions to an issue where runbook jobs are suspended in Azure Automation.
12+
13+
> [!NOTE]
14+
> Azure Automation enables recovery of runbooks deleted in the last 29 days. You can restore the deleted runbook by running a PowerShell script as a job in your Automation account. For more information, see [Restore a deleted runbook](/azure/automation/manage-runbooks#restore-deleted-runbook).
15+
16+
## Symptoms
17+
18+
Runbook jobs might be suspended after three failed start attempts.
19+
20+
## Cause 1: Exceeding memory or network socket limits in an Azure sandbox
21+
22+
- Memory limits
23+
24+
A job might fail if it uses more than 400 MB of memory.
25+
- Network socket limits
26+
27+
An Azure sandbox is limited to 1,000 concurrent network sockets.
28+
29+
For more information, see [Azure Automation limits](/azure/azure-resource-manager/management/azure-subscription-service-limits#azure-automation-limits).
30+
31+
Here are some suggestions for working within memory limits:
32+
33+
- Split the workload among multiple runbooks.
34+
- Reduce the amount of data processed in memory.
35+
- Avoid writing unnecessary output from your runbooks.
36+
- Consider the number of checkpoints written in your PowerShell workflow runbooks.
37+
38+
Here are some actions that can reduce the memory footprint of your runbook during runtime:
39+
40+
- Use the `clear` method, such as `$myVar.clear`, to clear variables.
41+
- Use the `[GC]::Collect` command to run the garbage collection immediately.
42+
43+
## Cause 2: Module incompatibility
44+
45+
Module dependencies might be incorrect. In this case, your runbook typically returns a "Command not found" or "Cannot bind parameter" error message.
46+
47+
To resolve this issue, [update Azure PowerShell modules in Azure Automation](/azure/automation/automation-update-azure-modules).
48+
49+
## Cause 3: Not authenticated with Microsoft Entra ID in an Azure sandbox
50+
51+
Azure Automation runbooks that attempt to call executables or subprocesses within an Azure sandbox environment can't use Microsoft Authentication Library (MSAL) to authenticate with Microsoft Entra ID.
52+
53+
To resolve this issue, use a managed identity for the Automation account. When you authenticate this runbook with Microsoft Entra ID by using a managed identity, ensure the following things:
54+
55+
- The Microsoft Graph PowerShell module is available in your Automation account.
56+
- The managed identity is granted the permissions required to execute the runbook automation tasks.
57+
58+
If your runbook can't call an executable or subprocess in an Azure sandbox, run the runbook on a [hybrid worker](/azure/automation/automation-hrw-run-runbooks). Hybrid workers aren't constrained by the memory and network limits of Azure sandboxes.
59+
60+
## References
61+
62+
- [Understand how Azure Resource Manager throttles requests](/azure/azure-resource-manager/management/request-limits-and-throttling)
63+
- [Troubleshooting API throttling errors](../../virtual-machines/windows/troubleshooting-throttling-errors.md)
64+
65+
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]

support/azure/automation/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
href: welcome-automation.yml
33
- name: Runbook not working as expected
44
items:
5+
- name: Runbook jobs get suspended
6+
href: runbooks/runbook-job-suspended.md
57
- name: Troubleshoot runbook execution issues when using PowerShell
68
href: runbooks/powershell-job-script-cmdlets-not-working.md
79

support/azure/automation/welcome-automation.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ landingContent:
2121
- title: Runbook not working as expected
2222
linkLists:
2323
- linkListType: how-to-guide
24-
links:
24+
links:
25+
- text: Runbook jobs get suspended
26+
url: runbooks/runbook-job-suspended.md
2527
- text: Troubleshoot runbook execution issues when using PowerShell
2628
url: runbooks/powershell-job-script-cmdlets-not-working.md

0 commit comments

Comments
 (0)