Hello Ahmed Ali Al-Lawati,
The new Azure Cache for Redis showing 0 MB in metrics and not appearing in the portal's cache overview despite serving traffic indicates a delay in metric indexing or a connection/monitoring configuration issue—new caches take 15-60 minutes to populate metrics after first data ingestion, and if the app isn't using the correct endpoint or auth, the portal won't register activity. Here's how to troubleshoot and fix:
Quick Troubleshooting Steps
- Verify Cache Configuration and Connection:
- Portal > Your Cache > Overview > Check Status: "Running". Copy Connection string (Access keys > Primary) and test connectivity from your app/code:
// Example in C# with StackExchange.Redis var config = "your-cache.redis.cache.windows.net:6380,password=your-key,ssl=True,abortConnect=False"; var connection = ConnectionMultiplexer.Connect(config); var db = connection.GetDatabase(); db.StringSet("test-key", "test-value"); var value = db.StringGet("test-key"); // Should return "test-value"- If fails: Check Firewall (Networking > Firewall > Allow public access or add client IP). Ensure SSL=True for Basic/Standard tiers.
- App-side: Confirm using host
yourcache.redis.cache.windows.net:6380(not localhost), and no port 6379 (TLS required).
- Portal > Your Cache > Overview > Check Status: "Running". Copy Connection string (Access keys > Primary) and test connectivity from your app/code:
- Check Metrics and Indexing Delay:
- Cache > Monitoring > Metrics > Select "Cache Memory Used" > Time range: Last 1 hour > Aggregation: Average.
- If 0: Wait 30 mins post-first write; new caches initialize metrics gradually.
- Cache Hits/Misses: If 0 despite traffic, no reads/writes hitting cache—log app calls to verify (e.g., add ILogger: "Cache hit for key X").
- Insights tab: Enable "Cache insights" if Premium tier (shows connected clients >0).
- Cache > Monitoring > Metrics > Select "Cache Memory Used" > Time range: Last 1 hour > Aggregation: Average.
- Fix Portal Visibility:
- Refresh portal (F5 or sign out/in); sometimes UI caches old state.
- Multiple caches: Search "Cache for Redis" in All resources—if not listed, recreate (rare resource ID conflict).
- Diagnostic settings: Monitoring > Diagnostic settings > Add > Send "AllMetrics" to Log Analytics > Query:
AzureMetrics | where ResourceProvider == "MICROSOFT.CACHE" and MetricName == "CacheMemoryUsed" | summarize avg(average) by bin(TimeGenerated, 5m)—confirms backend activity even if UI lags.
- Common Fixes:
- Cold Start: Perform initial writes/reads (e.g., 10 keys) to trigger metrics.
- Tier Limits: Basic tier metrics limited (no real-time); upgrade to Standard/Premium for full visibility.
- Network/VNet: If VNet-integrated, ensure NSG allows port 6380; test from Azure VM in same subnet.
- Restart: Cache > Restart (5-10 mins downtime)—resets monitoring.
Test a simple set/get first—metrics should appear within 15 mins. If persists >1 hour, open support ticket (Help > New > Technical > Cache for Redis > "Metrics not updating"). Share tier/size for more specifics.
Best Regards,
Jerald Felix