Poznámka:
Přístup k této stránce vyžaduje autorizaci. Můžete se zkusit přihlásit nebo změnit adresáře.
Přístup k této stránce vyžaduje autorizaci. Můžete zkusit změnit adresáře.
Common scenarios, error messages, and symptoms
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.
Configuration issues
These issues are the most common. They include:
- 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 Function App. - Storage account misconfigurations, including deleted accounts, rotated keys, and firewall restrictions. For more information, see Storage considerations for Azure Function App.
- Key Vault and Managed Identity access problems because of misconfigured permissions or missing identity assignments. For more information, see the following resources:
Customer code issues
These issues have the following causes:
- Faulty code patterns that cause high CPU or memory usage, SNAT exhaustion, or runtime exceptions (for example, division by zero or null reference).
- Long-running or inefficient functions that are especially problematic on consumption plans because of timeout constraints.
For more information, see the following resources:
- Azure Function App best practices
- Improve Azure Function App performance and reliability
- Manage connections in Azure Function App
Platform issues
These issues are less common but usually have a greater effect:
Unsupported runtime versions (for example, Azure Function App
~2.xor~3.x). For more information, see the following resources:Host startup failures, including placeholder site specialization errors and container allocation issues.
Typical error messages
You might experience common errors such as the following:
Azure Function App runtime is unreachable.
Function host not running.
Access Denied:
'C:\home\site\wwwroot\host.json'.HTTP 5xx errors: 503, 502, 500, or timeouts.
Symptoms to watch for
Function not triggering or running. See Analyze Azure Function App telemetry in Application Insights.
Missing invocation history or unexpected gaps.
High resource consumption (CPU or memory spikes that are flagged by detectors).
Timeouts or long response times, especially on Consumption plans (maximum of 230 seconds).
Functions not listed on the overview page.
Diagnostic tools
To identify and resolve issues, you can use the following tools in the Azure portal.
Function App Down or Reporting Errors (Preview)
To access this tool, follow these steps:
- Sign in to the Azure portal.
- Open Function App.
- Select Diagnose and solve problems.
- Search for Function App Down or Reporting Errors (Preview).
Features of this tool
- Automates key troubleshooting checks by using existing detectors.
- Provides minimal noise and focused root cause analysis.
- Supports conversational diagnostics.
Issue categories
Function app downtime errors are categorized as follows.
Common configuration issues
- Misconfigured application settings
- Incorrect or unreachable storage account configuration
- Key Vault access permission issues
- Managed Identity authentication problems
- Binding or trigger misconfiguration
- Network connectivity issues
Code and runtime resource issues
- High CPU or memory consumption
- SNAT port exhaustion
- TCP connection exhaustion
- Long-running or stuck functions
- Runtime exceptions and failures
- Poor error handling or retry logic
Diagnostic checks performed
The diagnostic workflow evaluates the following aspects of your function spp:
- General information
- Hosting plan type (Consumption, Premium, Dedicated, Flex)
- Runtime version
- Platform (Linux or Windows)
- Trigger types and bindings
- Startup issues
- Diagnostic events during app startup
- Offline history analysis for unexpected downtimes
- Recent deployments
- Highlights deployments that might have affected the app
- Runtime and language version validation
- Confirms use of supported versions
- Configuration checks
- Verifies mandatory app settings
- Verifies Key Vault and Managed Identity configuration
- Checks for SyncTrigger issues
- Detects Function Host name collisions
- Extension versions
- Identifies outdated or unsupported extensions
- Hosting plan setup
- Analyzes configuration and scaling behavior
- Checks for SNAT port exhaustion, high CPU, and memory issues
- Includes risk alerts:
- For Dedicated plans: verifies that AlwaysOn is enabled
- For Elastic Premium: checks VNet routing and scaling
- Execution health
- Detects:
- Execution failures
- Nontriggering functions
- Stuck or long-running executions
- Detects:
- AI-powered analysis
- Uses OpenAI to detect issue patterns and provide contextual recommendations
Application Insights queries
For diagnostics, run these queries in Application Insights:
Requests per worker (last 30 minutes):
requests | where timestamp > ago(30m) | summarize count() by cloud_RoleInstance, bin(timestamp, 1m) | render timechartTraces for errors (last 30 minutes):
traces | where timestamp > ago(30m) | where customDimensions.LogLevel == "Error"Runtime exceptions (last 30 minutes):
exceptions | where timestamp > ago(30m)
Note
Sampling is enabled by default. If it's necessary, disable this feature temporarily during an investigation.
For more information, see Analyze Azure Function App telemetry in Application Insights.
Network validator tool
Note
This tool applies to all hosting plans, except for the Windows and Linux Consumption plans.
If your app shows errors such as FAILED TO INITIALIZE RUN FROM PACKAGE.txt or host.json not found, use the network troubleshooter to resolve the errors.
To access the tool, follow these steps:
- Sign in to the Azure portal.
- Navigate to Diagnose and solve problems.
- Search for Connectivity Troubleshooter.
This tool checks for:
- DNS resolution
- Storage and Key Vault access
- Outbound restrictions (VNet, NSG, firewalls)
When you use the network validator, make sure that:
- VNet integration is correctly configured.
- No endpoint or firewall blocks are in place.
For more information, see the following resources:
- Azure Function App networking options
- Frequently asked questions about networking in Azure Function App
Kudu logs (SCM)
Note
This tool applies to all hosting plans, except for the Linux Consumption and Flex Consumption plans.
For information about how to access and use Kudu logs (SCM), see Access Kudu for your app.
Other logs
- Host Logs:
%HOME%\LogFiles\Application\Functions\Host - Functions log:
%HOME%\LogFiles\Application\Functions\Function\<your_triggername> - System-level log:
%HOME%\LogFiles\Eventlog.xml
For more information, see Understanding the Azure App Service file system.