Skip to content

Commit a62b63f

Browse files
Merge pull request #298083 from v-thepet/redis2a
Azure for Redis Cache Freshness #2
2 parents a089ce8 + 45a836e commit a62b63f

File tree

3 files changed

+200
-246
lines changed

3 files changed

+200
-246
lines changed
Lines changed: 18 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,31 @@
11
---
2-
title: Troubleshoot Azure Cache for Redis client issues
3-
description: Learn how to resolve common client issues, such as client memory pressure, traffic burst, high CPU, limited bandwidth, large requests, or large response size, when using Azure Cache for Redis.
2+
title: Troubleshoot client issues
3+
description: See links to troubleshooting issues that occur because of conditions on the Redis client that your application uses.
44

55

66

77
ms.topic: troubleshooting
8-
ms.date: 12/31/2021
8+
ms.date: 04/10/2025
99
appliesto:
1010
- ✅ Azure Cache for Redis
1111
---
1212
# Troubleshoot Azure Cache for Redis client-side issues
1313

14-
This section discusses troubleshooting issues that occur because of a condition on the Redis client that your application uses.
14+
The following links provide troubleshooting information for issues that occur because of conditions on the Redis client that your application uses.
1515

16-
- [Memory pressure on Redis client](#memory-pressure-on-redis-client)
17-
- [Traffic burst](#traffic-burst)
18-
- [High client CPU usage](#high-client-cpu-usage)
19-
- [Client-side bandwidth limitation](#client-side-bandwidth-limitation)
16+
- [High client connections](cache-troubleshoot-timeouts.md#high-client-connections)
17+
- [High CPU on client hosts](cache-troubleshoot-timeouts.md#high-cpu-on-client-hosts)
18+
- [Large key values](cache-troubleshoot-timeouts.md#large-key-values)
19+
- [Memory pressure on Redis client](cache-troubleshoot-timeouts.md#memory-pressure-on-redis-client)
20+
- [Network bandwidth limitations on client hosts](cache-troubleshoot-timeouts.md#network-bandwidth-limitation-on-client-hosts)
21+
- [RedisSessionStateProvider retryTimeout](cache-troubleshoot-timeouts.md#redissessionstateprovider-retrytimeout)
22+
- [TCP settings for Linux based client applications](cache-troubleshoot-timeouts.md#tcp-settings-for-linux-based-client-applications)
23+
- [Traffic burst and thread pool configuration](cache-troubleshoot-timeouts.md#traffic-burst-and-thread-pool-configuration)
2024

21-
## Memory pressure on Redis client
25+
The following articles provide more troubleshooting information:
2226

23-
Memory pressure on the client can lead to performance problems that can delay processing of responses from the cache. When memory pressure hits, the system might page data to disk. This _page faulting_ causes the system to slow down significantly.
24-
25-
To detect memory pressure on the client:
26-
27-
- Monitor memory usage on machine to make sure that it doesn't exceed available memory.
28-
- Monitor the client's `Page Faults/Sec` performance counter. During normal operation, most systems have some page faults. Spikes in page faults corresponding with request timeouts can indicate memory pressure.
29-
30-
High memory pressure on the client can be mitigated several ways:
31-
32-
- Dig into your memory usage patterns to reduce memory consumption on the client.
33-
- Upgrade your client VM to a larger size with more memory.
34-
35-
## Traffic burst
36-
37-
This section was moved. For more information, see [Traffic burst and thread pool configuration](cache-troubleshoot-timeouts.md#traffic-burst-and-thread-pool-configuration).
38-
39-
## High client CPU usage
40-
41-
This section was moved. For more information, see [High CPU on client hosts](cache-troubleshoot-timeouts.md#high-cpu-on-client-hosts).
42-
43-
## Client-side bandwidth limitation
44-
45-
This section was moved. For more information, see [Network bandwidth limitation on client hosts](cache-troubleshoot-timeouts.md#network-bandwidth-limitation-on-client-hosts).
46-
47-
## High client connections
48-
49-
When client connections reach the maximum for the cache, you can have failures in client requests for connections beyond the maximum. High client connections can also cause high server load when processing repeated reconnection attempts.
50-
51-
High client connections might indicate a connection leak in client code. Connections might not be getting reused or closed properly. Review client code for connection use.
52-
53-
If the high connections are all legitimate and required client connections, upgrading your cache to a size with a higher connection limit might be required. Check if the `Max aggregate for Connected Clients` metric is close or higher than the maximum number of allowed connections for a particular cache size. For more information on sizing per client connections, see [Azure Cache for Redis performance](cache-planning-faq.yml#azure-cache-for-redis-performance).
54-
55-
## Additional information
56-
57-
These articles provide more information on troubleshooting and performance testing:
58-
59-
- [Troubleshoot Azure Cache for Redis server issues](cache-troubleshoot-server.md)
60-
- [Troubleshoot Azure Cache for Redis latency and timeouts](cache-troubleshoot-timeouts.md)
61-
- [How can I benchmark and test the performance of my cache?](cache-management-faq.yml#how-can-i-benchmark-and-test-the-performance-of-my-cache-)
27+
- [Monitor Azure Cache for Redis](/azure/redis/monitor-cache)
28+
- [Troubleshoot connectivity issues](cache-troubleshoot-connectivity.md)
29+
- [Troubleshoot latency and `timeouts`](cache-troubleshoot-timeouts.md)
30+
- [Troubleshoot data loss](cache-troubleshoot-data-loss.md)
31+
- [Troubleshooting FAQs](cache-monitor-troubleshoot-faq.yml)
Lines changed: 15 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,30 @@
11
---
2-
title: Troubleshoot Azure Cache for Redis server issues
3-
description: Learn how to resolve common server issues, such as memory pressure, high CPU, long running commands, or bandwidth limitations, when using Azure Cache for Redis.
2+
title: Troubleshoot server issues
3+
description: See links to troubleshooting issues caused by conditions on an Azure Cache for Redis server or the virtual machines that host it.
44

55

66

77
ms.topic: conceptual
8-
ms.date: 02/02/2022
8+
ms.date: 04/10/2025
99
appliesto:
1010
- ✅ Azure Cache for Redis
1111

1212
---
1313

1414
# Troubleshoot Azure Cache for Redis server issues
1515

16-
This section discusses troubleshooting issues caused by conditions on an Azure Cache for Redis server or any of the virtual machines hosting it.
16+
The following links provide troubleshooting information for issues caused by conditions on an Azure Cache for Redis server or the virtual machines that host it.
1717

18-
- [High server load](#high-server-load)
19-
- [Scale up or scale out](#scale-up-or-scale-out)
20-
- [Rapid changes in number of client connections](#rapid-changes-in-number-of-client-connections)
21-
- [Long running or expensive commands](#long-running-or-expensive-commands)
22-
- [Scaling](#scaling)
23-
- [Server maintenance](#server-maintenance)
24-
- [High memory usage](#high-memory-usage)
25-
- [Long-running commands](#long-running-commands)
26-
- [Server-side bandwidth limitation](#server-side-bandwidth-limitation)
18+
- [High memory usage](cache-troubleshoot-timeouts.md#high-memory-usage)
19+
- [High server load](cache-troubleshoot-timeouts.md#high-server-load)
20+
- [Long running or expensive commands](cache-troubleshoot-timeouts.md#long-running-commands)
21+
- [Network bandwidth limitations](cache-troubleshoot-timeouts.md#network-bandwidth-limitations)
22+
- [Server maintenance](cache-troubleshoot-timeouts.md#server-maintenance)
2723

28-
> [!NOTE]
29-
> Several of the troubleshooting steps in this guide include instructions to run Redis commands and monitor various performance metrics. For more information and instructions, see the articles in the [Additional information](#additional-information) section.
30-
>
24+
The following articles provide more troubleshooting information:
3125

32-
## High server load
33-
34-
High server load means the Redis server is busy and unable to keep up with requests, leading to timeouts. Check the *Server Load* metric on your cache by selecting **Monitoring** from the Resource menu on the left. You see the **Server Load** graph in the working pane under **Insights**. Or, add a metric set to *Server Load* under **Metrics**.
35-
36-
Following are some options to consider for high server load.
37-
38-
### Scale up or scale out
39-
40-
Scale out to add more shards, so that load is distributed across multiple Redis processes. Also, consider scaling up to a larger cache size with more CPU cores. For more information, see [Azure Cache for Redis planning FAQs](cache-planning-faq.yml).
41-
42-
### Rapid changes in number of client connections
43-
44-
For more information, see [Avoid client connection spikes](cache-best-practices-connection.md#avoid-client-connection-spikes).
45-
46-
### Long running or expensive commands
47-
48-
This section was moved. For more information, see [Long running commands](cache-troubleshoot-timeouts.md#long-running-commands).
49-
50-
### Scaling
51-
52-
Scaling operations are CPU and memory intensive as it could involve moving data around nodes and changing cluster topology. For more information, see [Scaling](cache-best-practices-scale.md).
53-
54-
### Server maintenance
55-
56-
If your Azure Cache for Redis underwent a failover, all client connections from the node that went down are transferred to the node that is still running. The server load could spike because of the increased connections. You can try rebooting your client applications so that all the client connections get recreated and redistributed among the two nodes.
57-
58-
## High memory usage
59-
60-
Memory pressure on the server can lead to various performance problems that delay processing of requests. When memory pressure hits, the system pages data to disk, which causes the system to slow down significantly.
61-
62-
Here are some possible causes of memory pressure:
63-
64-
- The cache is filled with data near its maximum capacity
65-
- Redis server is seeing high memory fragmentation
66-
67-
Fragmentation is likely to be caused when a load pattern is storing data with high variation in size. For example, fragmentation might happen when data is spread across 1 KB and 1 MB in size. When a 1-KB key is deleted from existing memory, a 1-MB key can’t fit into it causing fragmentation. Similarly, if 1-MB key is deleted and 1.5-MB key is added, it can’t fit into the existing reclaimed memory. This causes unused free memory and results in more fragmentation.
68-
69-
If the `used_memory_rss` value is higher than 1.5 times the `used_memory` metric, there's fragmentation in memory. The fragmentation can cause issues when:
70-
71-
1. Memory usage is close to the max memory limit for the cache, or
72-
2. `UsedMemory_RSS` is higher than the Max Memory limit, potentially resulting in page faulting in memory.
73-
74-
If a cache is fragmented and is running under high memory pressure, the system does a failover to try recovering Resident Set Size (RSS) memory.
75-
76-
Redis exposes two stats, `used_memory` and `used_memory_rss`, through the [INFO](https://redis.io/commands/info) command that can help you identify this issue. You can [view these metrics](../redis/monitor-cache.md#view-cache-metrics) using the portal.
77-
78-
Validate that the `maxmemory-reserved` and `maxfragmentationmemory-reserved` values are set appropriately.
79-
80-
There are several possible changes you can make to help keep memory usage healthy:
81-
82-
- [Configure a memory policy](cache-configure.md#memory-policies) and set expiration times on your keys. This policy may not be sufficient if you have fragmentation.
83-
- [Configure a maxmemory-reserved value](cache-configure.md#memory-policies) that is large enough to compensate for memory fragmentation.
84-
- [Create alerts](../redis/monitor-cache.md#create-alerts) on metrics like used memory to be notified early about potential impacts.
85-
- [Scale](cache-how-to-scale.md) to a larger cache size with more memory capacity. For more information, see [Azure Cache for Redis planning FAQs](./cache-planning-faq.yml).
86-
87-
For recommendations on memory management, see [Best practices for memory management](cache-best-practices-memory-management.md).
88-
89-
## Long-running commands
90-
91-
This section was moved. For more information, see [Long running commands](cache-troubleshoot-timeouts.md#long-running-commands).
92-
93-
## Server-side bandwidth limitation
94-
95-
This section was moved. For more information, see [Network bandwidth limitation](cache-troubleshoot-timeouts.md#network-bandwidth-limitation).
96-
97-
## Additional information
98-
99-
- [Troubleshoot Azure Cache for Redis client-side issues](cache-troubleshoot-client.md)
100-
- [Choosing the right tier](cache-overview.md#choosing-the-right-tier)
101-
- [How can I benchmark and test the performance of my cache?](cache-management-faq.yml#how-can-i-benchmark-and-test-the-performance-of-my-cache-)
102-
- [Monitor Azure Cache for Redis](../redis/monitor-cache.md)
103-
- [How can I run Redis commands?](cache-development-faq.yml#how-can-i-run-redis-commands-)
26+
- [Monitor Azure Cache for Redis](/azure/redis/monitor-cache)
27+
- [Troubleshoot connectivity issues](cache-troubleshoot-connectivity.md)
28+
- [Troubleshoot latency and `timeouts`](cache-troubleshoot-timeouts.md)
29+
- [Troubleshoot data loss](cache-troubleshoot-data-loss.md)
30+
- [Troubleshooting FAQs](cache-monitor-troubleshoot-faq.yml)

0 commit comments

Comments
 (0)