stackexchange.redis

Stackexchange.Redis timeouts & socketfailures

依然范特西╮ 提交于 2019-12-03 21:17:21
I am using Azure Redis (using Stackexchange.Redis) as a cache storage and its generally working fine. But I am getting timeouts errors now and then and I can't nail down why it is happening. My redis connection settings: value="dev.redis.cache.windows.net,ssl=true,password=secret,abortConnect=false,syncTimeout=3000" I am getting all these exception in the same second (multiple calls): [I get these on GET operations aswell. Almost all these exceptions are on StringSet & StringGet. I rarely get exceptions on HashSets or HashGets] Timeout performing SET {key}, inst: 1, mgr: ExecuteSelect, queue:

Timeout performing SET {Key}, inst: 0, mgr: Inactive, queue: 2, qu=1, qs=1, qc=0, wr=1/1, in=0/0

大城市里の小女人 提交于 2019-12-03 20:50:53
I am trying to save a 90 KB pdf file into Azure Redis Cache using StackExchange.Redis client. I have converted that file into byte array and tried to save it using stringSet method and received error. Code: byte[] bytes = File.ReadAllBytes("ABC.pdf"); cache.StringSet(info.Name, bytes); --> This Line throws exception "Timeout performing SET {Key}, inst: 0, mgr: Inactive, queue: 2, qu=1, qs=1, qc=0, wr=1/1, in=0/0". Kindly Help. Timeout performing SET {Key}, inst: 0, mgr: Inactive, queue: 2, qu=1, qs=1, qc=0, wr=1/1, in=0/0 means, it has sent one request (qs), there is another request that's in

StackExchange.Redis async call hangs

六月ゝ 毕业季﹏ 提交于 2019-12-03 15:04:11
Trying to figure out why this code hangs. I can remove any one of the 3 lines at the bottom of the test and it won't hang, but all 3 together makes it hang. Any help would be greatly appreciated! [Fact] public async Task CanAddValuesInParallel() { var muxer = ConnectionMultiplexer.Connect("localhost"); var db = muxer.GetDatabase(); await AddAsync(db, "test", "1"); await db.KeyDeleteAsync("test"); Task.Run(() => AddAsync(db, "test", "1")).Wait(); } public async Task<bool> AddAsync(IDatabase db, string key, string value) { return await db.StringSetAsync(key, value, null, When.NotExists); } It

How to determine Redis memory leak?

强颜欢笑 提交于 2019-12-03 14:30:53
Our redis servers are, since yesterday, gradually (200MB/hour) using more memory, while the amount of keys (330K) and their data (132MB redis-rdb-tools ) stay about the same. Output of redis-cli info shows 6.89G used memory?! redis_version:2.4.10 redis_git_sha1:00000000 redis_git_dirty:0 arch_bits:64 multiplexing_api:epoll gcc_version:4.4.6 process_id:3437 uptime_in_seconds:296453 uptime_in_days:3 lru_clock:1905188 used_cpu_sys:8605.03 used_cpu_user:1480.46 used_cpu_sys_children:1035.93 used_cpu_user_children:3504.93 connected_clients:404 connected_slaves:0 client_longest_output_list:0 client

Azure Redis Cache - pool of ConnectionMultiplexer objects

为君一笑 提交于 2019-12-03 13:38:55
问题 We are using C1 Azure Redis Cache in our application. Recently we are experiencing lots of time-outs on GET operations. According to this article, one of possible solutions is to implement pool of ConnectionMultiplexer objects. Another possible solution is to use a pool of ConnectionMultiplexer objects in your client, and choose the “least loaded” ConnectionMultiplexer when sending a new request. This should prevent a single timeout from causing other requests to also timeout. How would

RedisSessionStateProvider ERR unknown command 'EVAL'

◇◆丶佛笑我妖孽 提交于 2019-12-03 13:25:41
When I run Microsoft.Web.Redis.RedisSessionStateProvider locally, I get the following error: StackExchange.Redis.RedisServerException: ERR unknown command 'EVAL' I have installed the latest RedisSessionStateProvider from nuget. Web config: <sessionState mode="Custom" customProvider="MySessionStateStore"> <providers> <add name="MySessionStateStore" type="Microsoft.Web.Redis.RedisSessionStateProvider" host="" accessKey="" ssl="false" /> </providers> </sessionState> I was running a version of redis server pre 2.6. Quick easy way to get redis server for windows is via chocolatey. Install from here

Running multiple instance of Redis on Centos

白昼怎懂夜的黑 提交于 2019-12-03 13:23:43
I want to run multiple instance of Redis on Centos 7. Can anyone point me to proper link or post steps here. I googled for the information but I didn't find any relevant information. Selva Kumar You can run multiple instances of Redis using different ports on a single machine. If this what concerns you then you can follow the below steps. By installing the first Redis instance, it listens on localhost:6379 by default. For Second Instance create a new working directory The default Redis instance uses /var/lib/redis as its working directory, dumped memory content is saved under this directory

StackExchange.Redis timeout and “No connection is available to service this operation”

你说的曾经没有我的故事 提交于 2019-12-03 05:26:13
问题 I have the following issues in our production environment (Web-Farm - 4 nodes, on top of it Load balancer): 1) Timeout performing HGET key, inst: 3, queue: 29, qu=0, qs=29, qc=0, wr=0/0 at StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl[T](Message message, ResultProcessor``1 processor, ServerEndPoint server) in ConnectionMultiplexer.cs:line 1699 This happens 3-10 times in a minute 2) No connection is available to service this operation: HGET key at StackExchange.Redis

Remove/Delete all/one item from StackExchange.Redis cache

核能气质少年 提交于 2019-12-03 04:06:45
问题 I am using StackExchange.Redis client with Azure Redis Cache Service. Here is my class, public class RedisCacheService : ICacheService { private readonly ISettings _settings; private readonly IDatabase _cache; public RedisCacheService(ISettings settings) { _settings = settings; var connectionMultiplexer = ConnectionMultiplexer.Connect(settings.RedisConnection); _cache = connectionMultiplexer.GetDatabase(); } public bool Exists(string key) { return _cache.KeyExists(key); } public void Save

Azure Redis Cache - pool of ConnectionMultiplexer objects

限于喜欢 提交于 2019-12-03 03:51:22
We are using C1 Azure Redis Cache in our application. Recently we are experiencing lots of time-outs on GET operations. According to this article , one of possible solutions is to implement pool of ConnectionMultiplexer objects. Another possible solution is to use a pool of ConnectionMultiplexer objects in your client, and choose the “least loaded” ConnectionMultiplexer when sending a new request. This should prevent a single timeout from causing other requests to also timeout. How would implementation of a pool of ConnectionMultiplexer objects using C# look like? Edit: Related question that I