Hello,
Welcome to Microsoft Q&A,
Monitor CPU, Memory & Disk Usage:
- Go to Azure App Service → Diagnose and Solve Problems.
- Click on "High Response Time" and "Performance Counters".
- Check:
- CPU Usage (
>80%
indicates issues). - Memory Usage (
>70%
might cause slowdowns). - Disk Queue Length (high values indicate slow I/O).
- CPU Usage (
Check Dependencies Using Application Insights:
- Enable App Insights:
- Azure Portal → App Service → Application Insights → Enable.
- Set
LOG_LEVEL=DEBUG
in Django for detailed logs.
- Use App Insights "Performance" tab to analyze:
- Django API response times.
- Third-party API requests.
- Database calls (even if DB CPU is low, slow queries still matter).
- Look for long response times in dependency calls.
- Third-party API requests.
- Django API response times.
- Set
- Azure Portal → App Service → Application Insights → Enable.
Solution:
- If external APIs are slow, use async calls in Django.
- If some queries are slow, try indexing and caching results.
Also consider
Optimize Gunicorn Workers to reduce Python cold start delays.
Check Scaling Policies if auto-scaling isn’t responding quickly.
Move Static Files to CDN instead of serving them from Django.
Please Upvote and Accept the Answer if it helps!!