AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

azure-diagnostics

Debug Azure production issues using AppLens, Azure Monitor, resource health, and safe triage, including evidence-only diagnosis without live access. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, container app 503 or target port mismatch, troubleshoot functions, function telemetry missing or stopped after a config/connection-string change, troubleshoot AKS, VM RDP, Linux SSH, VM black screen, can't connect to VM, reset VM password, NSG or firewall blocking, kubectl cannot connect, kube-system/CoreDNS failures, pod pending, crashloop, node not ready, upgrade failures, analyze logs, KQL, insights, image pull failures, cold start issues, health probe failures, resource health, root cause of errors, troubleshoot event hubs, troubleshoot service bus, messaging SDK error, AMQP connection failure, message lock lost, lock renewal during long-running processing, service bus dead letter.

Original source
microsoft
License
MIT
Pinned revision
3f5b461b2314e01c400564051e92469114c5b68f

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read microsoft--azure-diagnostics at revision 3f5b461b2314e01c400564051e92469114c5b68f, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 42

references/container-apps/README.md

Container Apps Troubleshooting

Request to "collect"/"gather" diagnostics? Once the app name and resource group are known from the request or existing context, run the containerapp-diagnostics script (PowerShell) directly as your first action — don't verify the app/resource group exists with separate calls first, and don't substitute the individual commands below for it. It's read-only and reports clearly if the resource can't be found. Ask only for identifiers that remain missing. See "Get All Diagnostic Info" below for usage.

Common Issues Matrix

| Symptom | Likely Cause | Quick Fix | |---------|--------------|-----------| | Image pull failure | ACR credentials missing | az containerapp registry set --identity system | | ACR build fails | ACR Tasks disabled (free sub) | Build locally with Docker | | Cold start timeout | min-replicas=0 | az containerapp update --min-replicas 1 | | Port mismatch | Wrong target port | Check Dockerfile EXPOSE matches ingress | | App keeps restarting | Health probe failing | Verify /health endpoint |

Image Pull Failures

Diagnose:

# Check registry configuration
az containerapp show --name APP -g RG --query "properties.configuration.registries"

# Check revision status
az containerapp revision list --name APP -g RG --output table

Fix:

az containerapp registry set \
  --name APP -g RG \
  --server ACR.azurecr.io \
  --identity system

ACR Tasks Disabled (Free Subscriptions)

Symptom: az acr build fails with "ACR Tasks is not supported"

Fix: Build locally instead:

docker build -t ACR.azurecr.io/myapp:v1 .
az acr login --name ACR
docker push ACR.azurecr.io/myapp:v1

Cold Start Issues

Symptom: First request very slow or times out

Fix:

az containerapp update --name APP -g RG --min-replicas 1

Health Probe Failures

Symptom: Container keeps restarting

Check:

# View health probe config
az containerapp show --name APP -g RG --query "properties.configuration.ingress"

# Check if /health endpoint responds
curl https://APP.REGION.azurecontainerapps.io/health

Fix: Ensure app has health endpoint returning 200:

app.get('/health', (req, res) => res.sendStatus(200));

Port Mismatch

Symptom: App starts but returns 502/503

Check:

az containerapp show --name APP -g RG --query "properties.configuration.ingress.targetPort"

Verify: App must listen on this exact port. Check:

  • Dockerfile EXPOSE statement
  • process.env.PORT or hardcoded port in app

View Logs

# Stream logs (wait for replicas if scale-to-zero)
az containerapp logs show --name APP -g RG --follow

# Recent logs
az containerapp logs show --name APP -g RG --tail 100

# System logs (startup issues)
az containerapp logs show --name APP -g RG --type system

Get All Diagnostic Info

Use the containerapp-diagnostics script (PowerShell) to collect everything in one call. It prints clearly labeled sections — revisions, registry config, ingress config, and recent logs — and a summary line describing what it collected. Interpreting the output remains your job.

..\..\scripts\containerapp-diagnostics.ps1 -Name <app> -ResourceGroup <rg>
../../scripts/containerapp-diagnostics.sh --name <app> --resource-group <rg>