In February 2024, the StackExchange.Redis community fixed a timeout bug that occurs when a client accesses a Tair (Redis OSS-compatible) instance in proxy mode with the multiple database (DB) feature. Upgrade to version 2.7.20 or later.
Details
Scope of impact
Timeout errors occur when all these conditions are met:
-
The StackExchange.Redis client version is earlier than 2.7.20.
-
The Tair instance uses cluster architecture with proxy mode or read/write splitting architecture.
-
The application runs the SELECT command to switch databases.
Error examples
1. StackExchange.Redis.RedisTimeoutException: Timeout performing xxx (5000ms), inst: 0, qu: 0, qs: 0, aw: False, rs: ReadAsync, ws: Idle, in: 0, in-pipe: 0, out-pipe: 0, serverEndpoint: XX.XX.XX.XX:6379, mgr: 10 of 10 available, clientName: 67c80fdab92d, PerfCounterHelperkeyHashSlot: 11235, IOCP: (Busy=0,Free=1000,Min=12,Max=1000), WORKER: (Busy=18,Free=32749,Min=12,Max=32767), v: xx.y.xx.xxx (Please take a look at this article for some common client-side issues that can cause timeouts: https://stackexchange.github.io/StackExchange.Redis/Timeouts)
2. Multiple databases are not supported on this server; cannot switch to database
Cause
Open-source Redis Cluster does not support multiple databases, so the SELECT command fails after migration from primary/standby to cluster architecture. However, the proxy mode of Tair (Redis OSS-compatible) supports multiple databases, enabling SELECT across cluster and read/write splitting architectures for smoother upgrades. Tair Proxy feature overview.
StackExchange.Redis versions earlier than 2.7.20 misidentify the proxy node of Tair as a standard cluster node, causing SELECT to fail. This is fixed in version 2.7.20.
Resolution
Upgrade StackExchange.Redis to version 2.7.20 or later.