Skip to content

Robertjam954/multimodal_rag_application / .claude/skills/azure-diagnostics

azure-diagnostics

Verified

Debug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe triage. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, troubleshoot functions, troubleshoot AKS, 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, service bus dead letter.

FileKindSize
SKILL.mdskill md5.5 KB
references/app-service/README.mdmarkdown7.2 KB
references/azure-resource-graph.mdmarkdown2.8 KB
references/container-apps/README.mdmarkdown2.8 KB
references/functions/README.mdmarkdown3.5 KB
references/kql-queries.mdmarkdown1.3 KB
troubleshooting/aks/aks-troubleshooting.mdmarkdown4.9 KB
troubleshooting/aks/general-diagnostics.mdmarkdown1.7 KB
troubleshooting/aks/load-balancer-and-ingress.mdmarkdown3.6 KB
troubleshooting/aks/network-policy.mdmarkdown832 B
troubleshooting/aks/networking.mdmarkdown5.5 KB
troubleshooting/aks/node-issues.mdmarkdown4.7 KB
troubleshooting/aks/pod-failures.mdmarkdown7.7 KB
troubleshooting/aks/references/aks-mcp.mdmarkdown1.5 KB
troubleshooting/aks/references/command-flows.mdmarkdown3.0 KB
troubleshooting/aks/references/inspektor-gadget.mdmarkdown7.0 KB
troubleshooting/aks/references/structured-input-modes.mdmarkdown1.5 KB
troubleshooting/aks/spot-and-zone-issues.mdmarkdown2.5 KB
troubleshooting/aks/upgrade-operations.mdmarkdown2.2 KB
troubleshooting/messaging/README.mdmarkdown1.6 KB
troubleshooting/messaging/auth-best-practices.mdmarkdown6.1 KB
troubleshooting/messaging/azure-eventhubs-dotnet.mdmarkdown3.5 KB
troubleshooting/messaging/azure-eventhubs-java.mdmarkdown3.2 KB
troubleshooting/messaging/azure-eventhubs-js.mdmarkdown2.7 KB
troubleshooting/messaging/azure-eventhubs-py.mdmarkdown4.3 KB
troubleshooting/messaging/azure-servicebus-dotnet.mdmarkdown2.5 KB
troubleshooting/messaging/azure-servicebus-java.mdmarkdown2.2 KB
troubleshooting/messaging/azure-servicebus-js.mdmarkdown2.4 KB
troubleshooting/messaging/azure-servicebus-py.mdmarkdown2.3 KB
troubleshooting/messaging/service-troubleshooting.mdmarkdown4.1 KB

troubleshooting/messaging/azure-servicebus-py.md

View on GitHub
# Azure Service Bus SDK — Python

Package: `azure-servicebus` | [README](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/servicebus/azure-servicebus/) | [Full Troubleshooting Guide](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/servicebus/azure-servicebus/TROUBLESHOOTING.md)

## Common Errors

| Exception | Cause | Fix |
|-----------|-------|-----|
| `ServiceBusAuthenticationError` | Invalid credentials | Check connection string, regenerate SAS key |
| `ServiceBusAuthorizationError` | Missing Send/Listen claim | Assign `Azure Service Bus Data Owner/Sender/Receiver` RBAC role |
| `ServiceBusConnectionError` | Network or firewall | Check AMQP port 5671, try `TransportType.AmqpOverWebsocket` |
| `OperationTimeoutError` | Service didn't respond in time | Adjust retry config, verify network |
| `MessageLockLostError` | Processing exceeded lock duration | Use `AutoLockRenewer`, reduce processing time |
| `SessionLockLostError` | Session lock expired | Reconnect to session, keep renewing lock |
| `MessageSizeExceededError` | Message or batch too large | Reduce payload. Premium supports individual messages up to 100MB. Batch limit is computed from max message size on the client, so batches can also be impacted |

## Enable Logging

```python
import logging, sys

handler = logging.StreamHandler(stream=sys.stdout)
handler.setFormatter(logging.Formatter("%(asctime)s | %(threadName)s | %(levelname)s | %(name)s | %(message)s"))
logger = logging.getLogger('azure.servicebus')
logger.setLevel(logging.DEBUG)
logger.addHandler(handler)

# Enable AMQP frame tracing
from azure.servicebus import ServiceBusClient
client = ServiceBusClient(..., logging_enable=True)
```

## AutoLockRenewer

```python
from azure.servicebus import AutoLockRenewer

renewer = AutoLockRenewer()
with receiver:
    for message in receiver.receive_messages(max_message_count=10):
        renewer.register(receiver, message, max_lock_renewal_duration=300)
        # process message
        receiver.complete_message(message)
```

## Key Issues

- **Mixing sync/async**: Don't use `time.sleep()` in async code; use `await asyncio.sleep()`.
- **Dead letter debugging**: Use `sub_queue=ServiceBusSubQueue.DEAD_LETTER` to inspect `dead_letter_reason` and `dead_letter_error_description`.
- **Always close clients**: Use `with` statement or call `close()` to avoid connection leaks.
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall