Troubleshooting¶
Platform-level troubleshooting reference for Azure App Service across runtimes.
Overview¶
flowchart TD
A[Incident Symptom] --> B[Collect Baseline]
B --> C{Issue Domain}
C --> D[Deployment Checks]
C --> E[Network Checks]
C --> F[Runtime and Logs]
D --> G[Validate and Mitigate]
E --> G
F --> G Diagnostic Tools Overview¶
| Tool | Purpose | Access |
|---|---|---|
| Kudu (SCM) | File system, process, environment, deployment diagnostics | https://${APP_NAME}.scm.azurewebsites.net |
| Log Stream | Real-time application and container logs | Azure Portal or CLI |
| Application Insights | Requests, traces, dependencies, exceptions | Azure Portal |
| Diagnose and solve problems | Built-in detectors and recommendations | Azure Portal > Web App |
Language-specific debugging
This document focuses on App Service platform diagnostics. For runtime/framework-specific startup and debugging issues, see the language-specific guides linked in Language-Specific Details.
Fast Triage Commands¶
az webapp show --resource-group $RG --name $APP_NAME --output table
az webapp log tail --resource-group $RG --name $APP_NAME
az webapp config appsettings list --resource-group $RG --name $APP_NAME --output table
az webapp deployment slot list --resource-group $RG --name $APP_NAME --output table
| Command | Description |
|---|---|
az webapp show --resource-group $RG --name $APP_NAME --output table | Shows a quick summary of the web app resource so you can confirm state, hostname, and plan. |
az webapp log tail --resource-group $RG --name $APP_NAME | Streams live application logs for the app into the terminal. |
az webapp config appsettings list --resource-group $RG --name $APP_NAME --output table | Lists the current app settings to verify runtime configuration. |
az webapp deployment slot list --resource-group $RG --name $APP_NAME --output table | Lists the app's deployment slots to confirm which slots exist during triage. |
Note:
az webapp log tailmay not work reliably for Linux App Service. Use the Azure Portal Log stream or/home/LogFilesas alternatives.
Linux custom container SCM caveat
For Linux custom containers, the SCM/Kudu site runs in a separate container from the app container. That means Kudu cannot directly inspect the app container's live filesystem or running processes. Prefer SSH into the app container, Log stream, or application/container logs when investigating runtime behavior inside a custom container.
Common Platform Issues¶
| Symptom | Likely Cause | Action |
|---|---|---|
| 503 Service Unavailable | Worker process failed or app is restarting | Check log stream, deployment logs, and latest restart events |
| 502 Bad Gateway | App failed to start or failed health probe | Verify startup command and health check path |
| Slow responses / timeouts | Long-running requests, dependency latency, plan saturation | Check request duration, dependency latency, CPU/memory metrics |
| Disk quota reached | Logs or generated files filling persistent storage | Clean unnecessary files in /home/LogFiles and app data |
| Intermittent outbound failures | SNAT port pressure or firewall allowlist mismatch | Reuse connections, review outbound IPs, add NAT Gateway if needed |
| DNS resolution failures for private endpoints | Private DNS Zone linkage issue | Verify Private DNS Zone links to integration VNet |
Deployment Troubleshooting¶
Check deployment history¶
| Flag | Description |
|---|---|
--resource-group $RG | Looks up deployment records for the app in the specified resource group. |
--name $APP_NAME | Selects the web app whose deployment history you want to inspect. |
--output table | Formats the deployment history as a readable summary table. |
Check latest deployment details¶
az webapp log deployment show \
--resource-group $RG \
--name $APP_NAME \
--deployment-id latest \
--output json
| Flag | Description |
|---|---|
--resource-group $RG | Scopes the deployment lookup to the resource group that contains the app. |
--name $APP_NAME | Selects the web app whose deployment details you need. |
--deployment-id latest | Requests the most recent deployment record instead of a specific historical ID. |
--output json | Returns the full deployment detail payload as JSON. |
Validate build-on-deploy setting¶
az webapp config appsettings list \
--resource-group $RG \
--name $APP_NAME \
--query "[?name=='SCM_DO_BUILD_DURING_DEPLOYMENT']"
| Flag | Description |
|---|---|
--resource-group $RG | Reads app settings from the specified resource group. |
--name $APP_NAME | Selects the app whose deployment-build setting you want to inspect. |
--query "[?name=='SCM_DO_BUILD_DURING_DEPLOYMENT']" | Filters the app settings list to the SCM_DO_BUILD_DURING_DEPLOYMENT entry so you can see whether build-on-deploy is enabled. |
Networking Troubleshooting¶
VNet integration status¶
| Flag | Description |
|---|---|
--resource-group $RG | Queries VNet integration state in the specified resource group. |
--name $APP_NAME | Lists the VNet integration entries attached to this web app. |
--output table | Shows the integration subnet and VNet details in table form. |
Route-all check¶
az webapp config appsettings list \
--resource-group $RG \
--name $APP_NAME \
--query "[?name=='WEBSITE_VNET_ROUTE_ALL']"
| Flag | Description |
|---|---|
--resource-group $RG | Reads app settings from the resource group that contains the app. |
--name $APP_NAME | Selects the web app whose route-all setting you want to inspect. |
--query "[?name=='WEBSITE_VNET_ROUTE_ALL']" | Filters the result to the WEBSITE_VNET_ROUTE_ALL setting entry only. |
This reads only the legacy app setting. A site can declare routing through the outboundVnetRouting properties instead, so an empty result here does not mean route-all is off; see Outbound VNet routing properties for how to inspect them.
Set route-all when required:
az webapp config appsettings set \
--resource-group $RG \
--name $APP_NAME \
--settings WEBSITE_VNET_ROUTE_ALL=1
| Flag | Description |
|---|---|
--resource-group $RG | Targets the resource group that contains the app. |
--name $APP_NAME | Selects the app whose settings will be updated. |
--settings WEBSITE_VNET_ROUTE_ALL=1 | Writes the setting that forces outbound app traffic through the VNet path. |
The legacy setting is still supported. Microsoft Learn recommends the outboundVnetRouting.allTraffic property; see Outbound VNet routing properties.
Outbound IP allowlist checks¶
az webapp show \
--resource-group $RG \
--name $APP_NAME \
--query "{outbound: outboundIpAddresses, possible: possibleOutboundIpAddresses}" \
--output json
| Flag | Description |
|---|---|
--resource-group $RG | Looks up the app in the specified resource group. |
--name $APP_NAME | Selects the web app whose outbound IP ranges you want to review. |
--query "{outbound: outboundIpAddresses, possible: possibleOutboundIpAddresses}" | Reshapes the az webapp show output (both fields are top-level, not under properties) into one object holding the currently active outbound IPs and the full possible outbound IP set. |
--output json | Keeps both IP lists in JSON format for copying into firewall reviews or automation. |
Allowlist all possible outbound IPs
The active outbound IP set can change as the app scales or moves. Add all addresses from possibleOutboundIpAddresses to external allowlists.
Kudu-Based Checks¶
- Open Kudu:
https://${APP_NAME}.scm.azurewebsites.net - Check environment:
/api/environment - Check running processes:
/api/processes - Review logs under
/home/LogFiles
For Linux custom containers, use those Kudu checks mainly for deployment context, environment snapshots, and shared logs. Do not assume /api/processes or Kudu file browsing reflects the main app container runtime state.
See Kudu API Reference for endpoint details.
Data to Collect Before Escalation¶
- UTC time window and affected endpoint(s)
- Correlation/operation ID (if available)
- Recent deployment ID and timestamp
- Plan SKU and current instance count
- Relevant error snippets (PII removed)
See Also¶
Sources¶
- Diagnose and Solve Problems in App Service (Microsoft Learn)
- Troubleshoot Diagnostic Logs in App Service (Microsoft Learn)
- Networking Features in App Service (Microsoft Learn)
Language-Specific Details¶
Runtime-specific startup failures, package/import issues, framework worker tuning, and language-level exception handling are documented in: