Skip to content

Commit 2a329fa

Browse files
Returning back to original branding. Future CI for branding change to come
1 parent 607f25c commit 2a329fa

File tree

7 files changed

+674
-0
lines changed

7 files changed

+674
-0
lines changed
Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
---
2+
title: Resolve Function App Down or Reporting Errors
3+
description: Describes how to troubleshoot an Azure Functions app if it's not responding or reports errors.
4+
ms.date: 08/05/2025
5+
ms.reviewer: v-liuamson; v-gsitser, v-ryanberg
6+
ms.custom: sap:Function app down or reporting errors
7+
---
8+
9+
# Resolve "Function App Down or Reporting Errors" issues
10+
11+
## Common scenarios, error messages, and symptoms
12+
13+
Microsoft Azure Function App failures typically fit into three major categories: configuration issues, customer code issues, and platform issues. This article explores these issues in detail and introduces the appropriate diagnostic tools for troubleshooting.
14+
15+
### Configuration issues
16+
17+
These issues are the most common. They include:
18+
19+
- Missing or incorrect application settings, such as `AzureWebJobsStorage`, `FUNCTIONS_WORKER_RUNTIME`, and binding-specific configurations. For more information, see the [App settings reference for Azure Functions](/azure/azure-functions/functions-app-settings).
20+
- Storage account misconfigurations, including deleted accounts, rotated keys, and firewall restrictions. For more information, see [Storage considerations for Azure Functions](/azure/azure-functions/storage-considerations?tabs=azure-cli).
21+
- Key Vault and Managed Identity access problems because of misconfigured permissions or missing identity assignments. For more information, see the following resources:
22+
- [Use Key Vault references as app settings - Azure App Service](/azure/app-service/app-service-key-vault-references?tabs=azure-cli#troubleshoot-key-vault-references)
23+
- [Create a function app without default storage secrets in its definition - Azure Functions](/azure/azure-functions/functions-identity-based-connections-tutorial)
24+
25+
### Customer code issues
26+
27+
These issues have the following causes:
28+
29+
- Faulty code patterns that cause high CPU or memory usage, SNAT exhaustion, or runtime exceptions (for example, division by zero or null reference).
30+
- Long-running or inefficient functions that are especially problematic on consumption plans because of timeout constraints.
31+
32+
For more information, see the following resources:
33+
34+
- [Azure Functions best practices](/azure/azure-functions/functions-best-practices?tabs=csharp)
35+
- [Improve Azure Functions performance and reliability](/azure/azure-functions/performance-reliability)
36+
- [Manage connections in Azure Functions](/azure/azure-functions/manage-connections?tabs=csharp)
37+
38+
### Platform issues
39+
40+
These issues are less common but usually have a greater effect:
41+
42+
- Unsupported runtime versions (for example, Azure Functions `~2.x` or `~3.x`).
43+
For more information, see the following resources:
44+
- [Azure Functions language stack support policy](/azure/azure-functions/language-support-policy?pivots=programming-language-csharp)
45+
- [Supported languages in Azure Functions](/azure/azure-functions/supported-languages?tabs=isolated-process%2Cv4&pivots=programming-language-csharp#languages-by-runtime-version)
46+
47+
- Host startup failures, including placeholder site specialization errors and container allocation issues.
48+
49+
### Typical error messages
50+
51+
You might experience common errors such as the following:
52+
53+
- **Azure Functions runtime is unreachable.**
54+
55+
- See [Troubleshoot error: Azure Functions runtime is unreachable](/azure/azure-functions/functions-recover-storage-account).
56+
57+
- **Function host not running.**
58+
59+
- **Access Denied**: `'C:\home\site\wwwroot\host.json'`.
60+
61+
- **HTTP 5*xx* errors**: 503, 502, 500, or timeouts.
62+
63+
### Symptoms to watch for
64+
65+
- Function not triggering or running. See [Analyze Azure Functions telemetry in Application Insights](/azure/azure-functions/analyze-telemetry-data#viewing-telemetry-in-monitor-tab).
66+
67+
- Missing invocation history or unexpected gaps.
68+
69+
- High resource consumption (CPU or memory spikes that are flagged by detectors).
70+
71+
- Timeouts or long response times, especially on Consumption plans (maximum of 230 seconds).
72+
73+
- Functions not listed on the overview page.
74+
75+
## Diagnostic tools
76+
77+
To identify and resolve issues, you can use the following tools in the Azure portal.
78+
79+
### Function App Down or Reporting Errors (Preview)
80+
81+
To access this tool, follow these steps:
82+
83+
1. Sign in to the [Azure portal](https://portal.azure.com).
84+
1. Open **Function App**.
85+
1. Select **Diagnose and solve problems**.
86+
1. Search for **Function App Down or Reporting Errors (Preview)**.
87+
88+
**Features of this tool**
89+
90+
- Automates key troubleshooting checks by using existing detectors.
91+
- Provides minimal noise and focused root cause analysis.
92+
- Supports [conversational diagnostics](https://techcommunity.microsoft.com/blog/appsonazureblog/power-of-conversational-diagnostics-public-preview-diagnostic-workflows/428866ution).
93+
94+
## Issue categories
95+
96+
Function app downtime errors are categorized as follows.
97+
98+
### Common configuration issues
99+
100+
- Misconfigured application settings
101+
- Incorrect or unreachable storage account configuration
102+
- Key Vault access permission issues
103+
- Managed Identity authentication problems
104+
- Binding or trigger misconfiguration
105+
- Network connectivity issues
106+
107+
### Code and runtime resource issues
108+
109+
- High CPU or memory consumption
110+
- SNAT port exhaustion
111+
- TCP connection exhaustion
112+
- Long-running or stuck functions
113+
- Runtime exceptions and failures
114+
- Poor error handling or retry logic
115+
116+
## Diagnostic checks performed
117+
118+
The diagnostic workflow evaluates the following aspects of your function spp:
119+
120+
- **General information**
121+
- Hosting plan type (Consumption, Premium, Dedicated, Flex)
122+
- Runtime version
123+
- Platform (Linux or Windows)
124+
- Trigger types and bindings
125+
- **Startup issues**
126+
- Diagnostic events during app startup
127+
- Offline history analysis for unexpected downtimes
128+
- **Recent deployments**
129+
- Highlights deployments that might have affected the app
130+
- **Runtime and language version validation**
131+
- Confirms use of supported versions
132+
- **Configuration checks**
133+
- Verifies mandatory app settings
134+
- Verifies Key Vault and Managed Identity configuration
135+
- Checks for SyncTrigger issues
136+
- Detects Function Host name collisions
137+
- **Extension versions**
138+
- Identifies outdated or unsupported extensions
139+
- **Hosting plan setup**
140+
- Analyzes configuration and scaling behavior
141+
- Checks for SNAT port exhaustion, high CPU, and memory issues
142+
- Includes risk alerts:
143+
- For Dedicated plans: verifies that **AlwaysOn** is enabled
144+
- For Elastic Premium: checks VNet routing and scaling
145+
- **Execution health**
146+
- Detects:
147+
- Execution failures
148+
- Nontriggering functions
149+
- Stuck or long-running executions
150+
- **AI-powered analysis**
151+
- Uses OpenAI to detect issue patterns and provide contextual recommendations
152+
153+
### Application Insights queries
154+
155+
For diagnostics, run these queries in Application Insights:
156+
157+
- **Requests per worker (last 30 minutes):**
158+
159+
```kusto
160+
requests
161+
| where timestamp > ago(30m)
162+
| summarize count() by cloud_RoleInstance, bin(timestamp, 1m)
163+
| render timechart
164+
```
165+
166+
- **Traces for errors (last 30 minutes):**
167+
168+
```kusto
169+
traces
170+
| where timestamp > ago(30m)
171+
| where customDimensions.LogLevel == "Error"
172+
```
173+
174+
- **Runtime exceptions (last 30 minutes):**
175+
176+
```kusto
177+
exceptions
178+
| where timestamp > ago(30m)
179+
```
180+
181+
> [!NOTE]
182+
> Sampling is enabled by default. If it's necessary, disable this feature temporarily during an investigation.
183+
184+
For more information, see [Analyze Azure Functions telemetry in Application Insights](/azure/azure-functions/analyze-telemetry-data#viewing-telemetry-in-monitor-tab).
185+
186+
### Network validator tool
187+
188+
> [!NOTE]
189+
> This tool applies to all hosting plans, except for the Windows and Linux Consumption plans.
190+
191+
If your app shows errors such as `FAILED TO INITIALIZE RUN FROM PACKAGE.txt` or `host.json not found`, use the [network troubleshooter](../../app-service/troubleshoot-vnet-integration-apps.md#network-troubleshooter) to resolve the errors.
192+
193+
To access the tool, follow these steps:
194+
195+
1. Sign in to the [Azure portal](https://portal.azure.com).
196+
1. Navigate to **Diagnose and solve problems**.
197+
1. Search for **Connectivity Troubleshooter**.
198+
199+
This tool checks for:
200+
201+
- DNS resolution
202+
- Storage and Key Vault access
203+
- Outbound restrictions (VNet, NSG, firewalls)
204+
205+
When you use the network validator, make sure that:
206+
207+
- VNet integration is correctly configured.
208+
- No endpoint or firewall blocks are in place.
209+
210+
For more information, see the following resources:
211+
212+
- [Azure Functions networking options](/azure/azure-functions/functions-networking-options?tabs=azure-portal#troubleshooting)
213+
- [Frequently asked questions about networking in Azure Functions](/azure/azure-functions/functions-networking-faq)
214+
215+
### Kudu logs (SCM)
216+
217+
> [!NOTE]
218+
> This tool applies to all hosting plans, except for the Linux Consumption and Flex Consumption plans.
219+
220+
For information about how to access and use Kudu logs (SCM), see [Access Kudu for your app](/azure/app-service/resources-kudu#access-kudu-for-your-app).
221+
222+
### Other logs
223+
224+
- **Host Logs**: `%HOME%\LogFiles\Application\Functions\Host`
225+
- **Functions log**: `%HOME%\LogFiles\Application\Functions\Function\<your_triggername>`
226+
- **System-level log**: `%HOME%\LogFiles\Eventlog.xml`
227+
228+
For more information, see [Understanding the Azure App Service file system](https://github.com/projectkudu/kudu/wiki/understanding-the-azure-app-service-file-system).
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: Upgrade the Azure Functions app runtime version or language version
3+
description: Describes how to upgrade the Azure Functions runtime to v4 and resolve issues during the upgrade.
4+
ms.date: 08/24/2023
5+
ms.custom: sap:Configuring and Managing Function Apps
6+
ms.reviewer: gasridha, v-sidong
7+
---
8+
# Troubleshoot common issues during Azure Runtime upgrade
9+
10+
This article describes how to resolve some of the common issues that may occur during the update of the function app language or runtime version, like runtime being unreachable and modules not being found.
11+
12+
## Actions to take if you receive an email "Action recommended: Update your Azure Functions apps to use .NET 6."
13+
14+
- Extended support for Microsoft .NET Core 3.1 ended on December 3, 2022. Azure Functions runtime v3 is based on .NET core 3.1. We recommend that you [update your function app](/azure/azure-functions/set-runtime-version#view-and-update-the-current-runtime-version) to runtime version 4.x, which uses .NET 6 and has long-term support. After December 3, 2022, your apps aren't eligible for new features, security patches, performance optimizations, or support until you upgrade them to Functions runtime version 4.x.
15+
16+
- Your Functions apps on runtime v3 will continue to run, and your applications aren't impacted. You can deploy code to these Functions applications after this date. But we may remove the ability for you to create applications targeting the Functions runtime v3 using common paths.
17+
18+
- For more information and migration guidance, see:
19+
20+
- [Functions runtime versions](/azure/azure-functions/functions-versions)
21+
- [Migrate apps from Azure Functions version 3.x to version 4.x](/azure/azure-functions/migrate-version-3-version-4)
22+
- [Migrate apps from Azure Functions version 1.x to version 4.x](/azure/azure-functions/migrate-version-1-version-4)
23+
24+
## Validate function app's compatibility for runtime v4
25+
26+
- Navigate to your function app in the [Azure portal](https://portal.azure.com). Select **Diagnose and solve problems** to open [Azure Functions diagnostics](/azure/azure-functions/functions-diagnostics). In the **Search** bar, type *Updating Function App Language or Runtime Version* to run it directly. The diagnostic report includes guidance on the update. After validation completes, follow the recommendations and address any issues in your app.
27+
- We also provide a [pre-upgrade validator](/azure/azure-functions/migrate-version-3-version-4#run-the-pre-upgrade-validator) to help you identify potential issues when migrating your function app to 4.x. From the same diagnostics search bar, type *Functions 4.x Pre-Upgrade Validator* to run it directly. After validation completes, follow the recommendations and address any issues in your app.
28+
- We strongly recommend [upgrading your local project environment](/azure/azure-functions/migrate-version-3-version-4#upgrade-your-local-project) to version 4.x. Fully test your app locally using version 4.x of the Azure Functions core tools.
29+
- Consider using a [staging slot](/azure/azure-functions/migrate-version-3-version-4#upgrade-using-slots) to test and verify your app in Azure on the new runtime version before deploying to a production slot. Remember to set `WEBSITE_OVERRIDE_STICKY_EXTENSION_VERSIONS=0` for migration with slots.
30+
31+
## Change the Functions runtime version for Windows
32+
33+
1. Set [FUNCTIONS_EXTENSION_VERSION](/azure/azure-functions/functions-app-settings), which is an app setting in the Azure portal **Configuration** pane, to `~4`. For more information, see [Change the runtime version](/azure/azure-functions/set-runtime-version#view-and-update-the-current-runtime-version).
34+
1. Set the `netFrameworkVersion` site setting to target .NET 6. `netFrameworkVersion` is a SiteConfig setting, not an app setting. And it's not directly available in the Azure portal. But you can set it by using [Azure Resource Explorer](https://azure.microsoft.com/blog/azure-resource-explorer-a-new-tool-to-discover-the-azure-api/) or [Azure CLI/PowerShell](/azure/azure-functions/functions-versions#migrate-without-slots).
35+
36+
For more information, see [Functions runtime versions](/azure/azure-functions/functions-versions).
37+
38+
## Change the Functions runtime version for Linux
39+
40+
1. Set [FUNCTIONS_EXTENSION_VERSION](/azure/azure-functions/functions-app-settings), which is an app setting in the Azure portal **Configuration** pane, to `~4`. For more information, see [Change the runtime version](/azure/azure-functions/set-runtime-version#view-and-update-the-current-runtime-version).
41+
1. Set `LinuxFxVersion`, by using Command Line Interface (CLI), to `<Language>|<LanguageVersion>`, based on the language used. For more information, see [Using LinuxFxVersion for Linux Function Apps](https://github.com/Azure/azure-functions-host/wiki/Using-LinuxFxVersion-for-Linux-Function-Apps). For example, to update to .NET 6, you can set `LinuxFxVersion` to `dotnet|6.0` and `FUNCTIONS_EXTENSION_VERSION` to `~4`.
42+
43+
For more information, see [Functions runtime versions](/azure/azure-functions/functions-versions).
44+
45+
## Get a list of supported languages by the runtime version
46+
47+
See the [list of supported languages by the runtime version](/azure/azure-functions/supported-languages#languages-by-runtime-version).
48+
49+
## Update the language version setting for the function app after updating the code
50+
51+
- PowerShell: In the [Azure portal](https://portal.azure.com), set the `PowerShell Core version`. For more information, see [Change the PowerShell version](/azure/azure-functions/functions-reference-powershell#changing-the-powershell-version).
52+
- Python: Set `linuxFxVersion` to `python|3.x`. For more information, see [Change the Python version](/azure/azure-functions/functions-reference-python#changing-python-version).
53+
- Java: Specify the language version by using `-DjavaVersion` as 11 or 17. For more information, see [Specify the deployment version](/azure/azure-functions/functions-reference-java#specify-the-deployment-version).
54+
- Node, JavaScript: For Windows, set the `WEBSITE_NODE_DEFAULT_VERSION` app setting to `~16`. For Linux, set `linuxFxVersion`, by using CLI, to `node|16`. For more information, see [Set the Node version](/azure/azure-functions/functions-reference-node#setting-the-node-version).
55+
56+
## Azure Functions Proxies usage
57+
58+
Support for proxies is available again in version 4.x so that you can successfully upgrade your function apps to the latest runtime version. However, we recommend that you switch to integrating your function apps with Azure API Management as soon as possible. API Management lets you take advantage of a more complete set of features to define, secure, manage, and monetize your Functions-based APIs. For more information, see [How to migrate to APIM](/azure/azure-functions/functions-proxies#migration) and [Integrate Functions with APIM using Visual Studio](/azure/azure-functions/openapi-apim-integrate-visual-studio).
59+
60+
## Get a list of all the Azure Functions apps that use runtime version 1.x, 2.x, or 3.x
61+
62+
1. Navigate to your function app in the [Azure portal](https://portal.azure.com).
63+
1. Select **Diagnose and solve problems** to open [Azure Functions diagnostics](/azure/azure-functions/functions-diagnostics).
64+
1. In the **Search** bar, type *Updating Function App Language or Runtime Version* to run it directly.
65+
1. In the diagnostic report, scroll down and select **List All Function App** > **View Details**.
66+
1. Set the search filters and select **Show** to get the list of functions apps in the current subscription.
67+
68+
Alternately, you can use App Service REST API calls ([GetConfiguration](/rest/api/appservice/web-apps/get-configuration)) to determine this. `LinuxFxVersion` and `WindowsFxVersion` provide the version information.
69+
70+
## Move a .NET Framework 4.6.1 app from Functions runtime v1 to v4
71+
72+
.NET Framework 4.6.1 has reached end-of-life, so apps should be upgraded to .NET Framework 4.8. In Functions v4, you can run a .NET framework 4.8 app in out-of-process mode. For more information, see the [isolated process guide](/azure/azure-functions/dotnet-isolated-process-guide).
73+
74+
## A migrated function app isn't starting or has some runtime issues
75+
76+
- For .NET apps, remember to update the code to .NET 6 before building and deploying.
77+
- Double-check the runtime version of the app in the [Azure portal](https://portal.azure.com).
78+
- For Windows apps, you must also set `netFrameworkVersion` by using CLI or PowerShell.
79+
- Make sure you're using the 2.x or later [extension bundles](/azure/azure-functions/functions-versions#minimum-extension-versions), as recommended. Version 4.x of the Functions runtime requires versions 2.x or 3.0.0.
80+
- Logging in to Azure Storage using *AzureWebJobsDashboard* is no longer supported in 4.x. Instead, use [Application Insights](/azure/azure-functions/functions-monitoring) for monitoring.
81+
- If you receive a message that Azure Functions runtime is unreachable and you're sharing storage accounts, see [Host ID considerations](/azure/azure-functions/storage-considerations#host-id-considerations).
82+
- Azure Functions 4.x doesn't support Node.js 10 and 12, Python 3.6, and PowerShell 6. For more information, see [Language versions supported for the v4 runtime](/azure/azure-functions/supported-languages#languages-by-runtime-version).
83+
- For Python functions, if there are errors related to module collision and module not found, try setting `PYTHON_ISOLATE_WORKER_DEPENDENCIES` to *1* in app settings.
84+
- Review [Migrating existing function apps](/azure/azure-functions/functions-versions#migrating-existing-function-apps).
85+
- For runtime issues, from the **Diagnose and Solve Problems** option in the [Azure portal](https://portal.azure.com), search for **Function app down or reporting errors** and review the diagnostic report for error messages and solutions. Also review the **Function Configuration checks** detector to make sure that the configuration is correct.
86+
- Review the blog [Issues when upgrading Azure function apps to V4](https://techcommunity.microsoft.com/t5/apps-on-azure-blog/issues-you-may-meet-when-upgrading-azure-function-app-to-v4/ba-p/3288983) for additional troubleshooting tips.
87+
88+
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]

0 commit comments

Comments
 (0)