1,142 questions
0
votes
0
answers
37
views
StackExchange.Redis timeout when moving from Azure Premium Redis to Azure Managed (non Enterprise to Enterprise)
We have a current Azure Premium instance running with no problems at around 1k operations per second.
We've created a new Azure Managed Redis instance. We naively thought just updating the connection ...
1
vote
1
answer
28
views
Sync-ops in stackexchange redis timeouts
StackExchange.Redis.RedisTimeoutException: Timeout awaiting response (outbound=0KiB, inbound=4KiB, 6000ms elapsed, timeout is 3000ms), command=EXISTS, next: GET mykey, inst: 0, qu: 0, qs: 0, aw: True, ...
1
vote
0
answers
41
views
I have an ASP.NET Core application that uses Redis as cache but it is recently facing a lot of timeout exceptions
Redis has been recently facing a lot of timeout errors. We are currently using stackExchange.redis or managing Redis in the ASP.NET Core application.
We have used async whenever possible with proper ...
1
vote
0
answers
141
views
How do I find out what's causing these valkey AWS Elasticache requests to timeout?
We have sporadic, but repeatable, timeout issues with valkey at higher loads that we haven't been able to diagnose the root cause of. We're using StackExchange.Redis on the old school .NET Framework 4....
1
vote
0
answers
37
views
Frequent RedisTimeoutException in .NET 9 running on Linux containers with Redis on AWS (v7.0.7)
I am frequently encountering RedisTimeoutException errors in my application. The application is built using .NET 9 and runs in Linux-based containers. Redis is hosted on AWS Elastic Cache with version ...
2
votes
1
answer
82
views
AutoFac DependencyResolutionException when using hybrid cache with redis
I run into a runtime error when using autofac in combination with hybrid cache and redis. I hope someone can explain why this error occurs.
When using autofac to resolve an instance of HybridCache in ...
2
votes
0
answers
87
views
Debugging SignalR Redis backplane issues
We have an ASP.NET Core application (scaled out) with SignalR hubs. A Microsoft.AspNetCore.SignalR.StackExchangeRedis Redis backplane is in place using .AddStackExchangeRedis(). Messages are sent to ...
-3
votes
2
answers
89
views
Using StackExchange.StringSetAsync to set multiple keys with the same expiration
We are currently using the StackExchange Redis library to handle our Redis-database but came across a little snag. Please keep in mind that we are new to Redis, so there might be a better way to do ...
0
votes
2
answers
113
views
Distributed Cache (redis) InstanceName in options of AddStackExchangeRedisCache does not prefix keys
I am new to redis. I have an instance of "Azure Cache for Redis" and try to use it in a .NET 8 client.
Here is my initialization:
// Hostname from Azure Cache for Redis
string redisHostname =...
0
votes
1
answer
168
views
Redis Cache Timeout with .NET Application in AKS
I'm using FusionCache on a .NET 8 backend hosted in AKS with multiple pods. The cache is backed by Azure Redis (C3 Standard). Everything was working fine in dev/staging, but since going live in ...
1
vote
1
answer
123
views
How to use LuaScript with dynamic KEYS and ARGV collections in StackExchange.Redis without losing script caching?
I'm using StackExchange.Redis and want to execute a Lua script that performs SADD operations on multiple sets, where both the keys and values are passed dynamically.
Here's the Lua script I'm trying ...
0
votes
1
answer
258
views
.NET 9 HybridCache tags
I have started using version 9.3.0 of HybridCache in .NET 9 (Microsoft.Extensions.Caching.Hybrid).
It appears that the RemoveByTagAsync method doesn't work in Redis. The cache items remain after ...
0
votes
0
answers
528
views
What could be causing my Redis/Valkey/ElastiCache timeout error?
I'm using a Valkey ElastiCache with StackExchange.Redis on .NET. It's usually working but sometimes I'll get this message:
The message timed out in the backlog attempting to send because no connection ...
0
votes
0
answers
52
views
Redis Timeouts issue
We have a server configuration 4 servers pretty much maxed out specs possible in Azure. They are behind a load balancer. Our ASP.NET web application uses Redis for Session State. We receive ...
0
votes
0
answers
45
views
Centrifugo does not receive messages from Redis
I have following Docker Compose file.
version: "3.7"
services:
redis:
image: redis:7.4.2
container_name: hub-redis
ports:
- "6379:6379"
environment:
- ...
1
vote
1
answer
140
views
Implementation of Sliding expiry in redis cache (IDistributedCache) in ASP.NET
I am migrating my caching mechanism from Memory cache to Redis in a .NET application and using IDistributedCache for abstraction. In Memory cache. Now that I’m switching to Redis, I want to understand ...
0
votes
1
answer
59
views
How does a Redis cluster scale and work along with .NET IDistributedCache along with a cloud based app service?
I have used Redis for caching in .NET using the IMemoryCache implementations for both Redis and SQL Server. It is straight forward and no problem.
I've been trying to understand IDistributedCache ...
0
votes
1
answer
204
views
Does StackExchange Redis Cache recreate connection on Error in the SetAsync method?
We use the Redis cache for our web-api app. We use the Microsoft.Extensions.Caching.StackExchangeRedis. After some works were made on Redis server, our app has failed to write to the cache:
"...
0
votes
0
answers
122
views
StackExchange.Redis using TLS Certificate Errors
I have installed Redis locally and configured TLS:
redis.conf
tls-cert-file ~/my.crt.pem
tls-key-file ~/my.key.pem
tls-ca-cert-file ~/ca_root.crt
I can use redis-cli to connect to it just fine by:
...
1
vote
2
answers
155
views
Cannot Connect to Redis Cluster inside Docker from Client
I’m trying to set up a Redis Cluster inside Docker using the following docker-compose.yml file:
version: '3.9'
services:
redis-stack-node-1:
image: redis:latest
container_name: redis-stack-...
0
votes
0
answers
40
views
Unable to deserialize the data into TValue
I have following code, which is setting & fetching data from Redis DB.
public void BulkSet(Dictionary<TKey, TValue> keyValues)
{
if (keyValues == null || keyValues.Count == 0) return;
...
0
votes
0
answers
64
views
ConnectionMultiplexer exception caused when trying to invoke webAPI endpoints -
I am facing an exception(ConnectionMultiplexer) message when trying to access a .NetCore 8 webAPI endpoint. I tried to use repositoryPattern in my project so there's a GenericRepository interface. I ...
1
vote
1
answer
212
views
Redis cache busting - "dynamic" keys
We're using Redis for caching in our .NET 8 APIs (Azure Redis for some, Enterprise Redis for others).
Certain API endpoints take query string parameters, and these parameters are factored into the ...
0
votes
1
answer
14
views
Sorted set precondition to check that the new addition has the highest score
We are working on a solution where we want to add a new entity only if the score of this new entity is the highest among all the entities in the existing redis sorted set.
Is there a precondition ...
0
votes
1
answer
1k
views
Triggering eager refresh with FusionCache from consumer side
I have a service that can produce some data. And some others that are consuming that data. The consumers can request the data over masstransit. But as producing that data is relatively expensive and ...
1
vote
0
answers
847
views
Redis Sentinel: The ConnectionMultiplexer is not a Sentinel connection. Detected as: Standalone Error
Our project is a .NET 8 API project, and we are using Redis version 2.8.0 as a caching mechanism. However, we are randomly encountering an error that shows "Sentinel: The ConnectionMultiplexer is ...
3
votes
2
answers
251
views
How can I use NodaTime with redis?
I am using the HybridCahce implementation from .net 9, with a DragonFly instance as the distributed cache, and works as expected with:
builder.Services.AddStackExchangeRedisCache(options => options....
-1
votes
1
answer
576
views
Redis timeout when there are a large number of keys
My WebAPI is written using the .NET framework 4.7.2 and i also use RedisStackChange 2.8.0.
I had a problem when the number of keys in redis reached about 7 million keys:
StackExchange.Redis....
1
vote
2
answers
102
views
Can't setup mocked Redis IDatabase using Moq
This is my test for my cache in program:
[Fact]
public async Task Cache_Works_Correctly()
{
const string testkey = "69";
const string testvalue = "Nice";
var ...
3
votes
2
answers
2k
views
StackExchange.Redis.RedisTimeoutException Timeout performing EXISTS (Since moving WebApp to .NET8)
I'm sure the issue here is not with StackExchange.Redis but something in our Azure App Service config/startup/setup.
We have been using StackExchange.Redis happily for years. We migrated an Azure App ...
1
vote
0
answers
93
views
Microsoft.Web.SessionStateProvider - Timeout Performing EVAL
Can someone help me identify what is the bottleneck here in my Redis Master-Replica setup? Adding some of my observations
This is happening randomly
This suggest that a timeout has occurred while ...
0
votes
1
answer
100
views
Cannot use a pattern to find keys in redis even when keys do exist
I am using Azure Redis and I cannot get this simple search to work
What am I doing wrong?
When I search for a specific key which I know is in the cache its not found?
private async Task ...
2
votes
1
answer
124
views
Is using the FireAndForget flag inside a StackExchange.Redis transaction meaningful?
If I use CommandFlags.FireAndForget inside a transaction with StackExchange.Redis, does this flag actually do anything? Or does the transaction completion wait until the Fire and Forget command has ...
0
votes
1
answer
37
views
How can I use Redis to return file data as range requests?
I am in the process of replacing a basic file serving API call which looks like this:
return Results.File("myfile.pdf", MediaTypeNames.Application.Pdf, enableRangeProcessing: true);
If I ...
3
votes
1
answer
289
views
Why does the KeyAsync loop hang when scanning Redis keys with StackExchange.Redis?
I'm trying to scan all Redis keys that match a specific pattern using the StackExchange.Redis library. However, my code hangs at the await foreach statement while scanning the keys. Here’s what I have:...
2
votes
0
answers
215
views
redis connection not working with go-redis?
I cannot connect to my local redis through my go project.
I am starting redis using docker compose like so:
redis:
image: redis:6.2.3-alpine
platform: linux/x86_64
ports:
- 6379:...
0
votes
0
answers
329
views
StackExchange.Redis.RedisTimeoutException: Timeout performing SMEMBERS (5000ms)?
I can see this error in my logs:
StackExchange.Redis.RedisTimeoutException: Timeout performing SMEMBERS
(5000ms), inst: 206, qu: 204, qs: 0, aw: True, bw: Starting, rs:
ReadAsync, ws: Idle, in: 0, in-...
0
votes
1
answer
601
views
.NET Amazon Elasticache - Redis cluster random timeout errors
Recently we introduced storing user session data on Amazon's ElastiCache through Redis Cache. I was a little worried of the speed and latency issues of this solution as before the session data was ...
1
vote
1
answer
121
views
Handle Redis values from processing more than once in multi-instance deployment
In .NET API I have a background service that executes every 0.1 seconds, this gets all values from a redis hash key, and runs a for loop with those and then processes those inside the for loop.
The ...
0
votes
1
answer
185
views
Azure Redis Cache not found in AzureClientFactoryBuilder Isolated .NET 8
I'm working on an Isolated .NET 8 Azure Functions project
I want to use Azure Redis Cache using the IServiceCollection and AzureClientFactoryBuilder in the program.cs file.
I'm able to use ...
2
votes
1
answer
5k
views
Valkey Cache in C#
I am trying to use Valkey with the IDistributedCache interface in C#. I have pulled the Valkey container using docker pull valkey/valkey and I am running it on the default port 6379. However, there ...
2
votes
1
answer
261
views
Unity - resolve IDistributedCache
I am trying to implement a Redis Distributed cache into a Net Framework 4.8 application. I am in the unfortunate position of having to downgrade a solution that was working perfectly fine in Net Core ...
0
votes
0
answers
165
views
Redis instrumentation ASP.NET Core suppress logs from Activity
Currently using Redis instrumentation
otel.WithTracing(tracing => tracing.AddRedisInstrumentation("name", connection, null)) in Program.cs to get traces and it works, but for each ...
0
votes
1
answer
315
views
Can't communicate with Redis container ASP.NET Core
I'm trying create a demo in ASP.NET Core 8 to save data in Redis cache. Everything works perfectly when I use localhost:6379. But when my app.net container is running and try to communicate with the ...
3
votes
0
answers
73
views
Why signal R app throwing SocketClosed exception for RedisConnection(in aws) for and state is "ConnectedEstablished" and app works fine?
I am connecting to redis aws elasticache , signal r application is broadcasting messages just fine with it, however getting below exception logged in error log -
StackExchange.Redis....
1
vote
0
answers
71
views
How to check if SignalR is using redis elasticache programmatically in C#. Is there any code to get stored key value pairs
Code is as below -
services.AddSignalR()
.AddStackExchangeRedis("*****.*****.com:6379", opts =>
{
opts.Configuration.ChannelPrefix = &...
1
vote
0
answers
70
views
Is there a way to add List<T> to redis in c#?
Is there a way to add List<T> to Redis in c# , but then when I retrieve the List from Redis , I should be able to do pagination and sorting?
I'm aware of the ability to store in sorted sets ...
-3
votes
2
answers
237
views
Redis Stream I need Event Driven Architecture,
When any new message received in the stream, on that time OnMessageReceived event should trigger.
public event EventHandler<MqMessageReceivedEventArgs> OnMessageReceived;
var result = await ...
0
votes
0
answers
105
views
REDIS Keys in Kubernetes deleted after 24 hours of migrating to Azure Cache for Redis
We have Kubernetes cluster in which we have deployed a Redis instance using Helm chart chart=redis-9.4.3 , Disk is 8gb for persistence via AOF way.
Image : docker.io/bitnami/redis:5.0.5-debian-9-r169
...
0
votes
0
answers
495
views
Method not found using StackExchange.Redis
I'm trying to implement Redis caching in our sitecore setup, but I'm having trouble doing so. We are running dotnet framwork 4.8 in a containerized setup.
I've install StackExchange.Redis Nuget ...