stackexchange.redis

StackExchange.Redis server.Keys(pattern:“IsVerySlow*”)

萝らか妹 提交于 2019-11-30 11:46:31
I'm new to redis so I'm doing something wrong, I'm sure: I've stored roughly 16,000 key/values in Azure Redis. I used the following to write the keys/values foreach (var worksheet in wksList) { var wksYYMM = string.Format("{0}{1:00}", worksheet.ReviewDt.Year, worksheet.ReviewDt.Month); var wksKey = string.Format("{0}:{1}:{2}", provCode, wksYYMM, worksheet.AcctNbr); string jsonStr = JsonConvert.SerializeObject( MakeWsListDto(worksheet, provCoderList, rvrList)); cache.StringSet(wksKey, jsonStr); } so my keys look like this: "AP:201401:AZ5798BK" When I try a lookup like: var keys = server.Keys

StackExchange.Redis.StrongName is refrenced but not included as package

旧街凉风 提交于 2019-11-30 09:11:05
问题 I'm starting a new project using StackExchange.Redis and .Net Core 2.0. But I get a conflict: The type 'ConnectionMultiplexer' exists in both 'StackExchange.Redis.StrongName, Version=1.2.4.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46' and 'StackExchange.Redis, Version=1.2.6.0, Culture=neutral, PublicKeyToken=null' Why is this showing even thou I'm not referencing StackExchange.Redis.StrongName and it's not even the same assembly version? 回答1: I found my solution here. By adding this

How to increase Redis performance when 100% CPU? Sharding? Fastest .Net Client?

∥☆過路亽.° 提交于 2019-11-30 07:36:36
Due to massive load increases on our website redis is now struggling with peak load because the redis server instance is reaching 100% CPU (on one of eight cores) resulting in time outs. We've updated our client software to ServiceStack V3 (coming from BookSleeve 1.1.0.4) and upgraded the redis server to 2.8.11 (coming from 2.4.x). I chose ServiceStack due to the existence of the Harbour.RedisSessionStateStore that uses ServiceStack.Redis. We used AngiesList.Redis before together with BookSleeve, but we experienced 100% with that too. We have eight redis servers configured as a master/slave

StackExchange.Redis.StrongName is refrenced but not included as package

六月ゝ 毕业季﹏ 提交于 2019-11-29 13:33:30
I'm starting a new project using StackExchange.Redis and .Net Core 2.0. But I get a conflict: The type 'ConnectionMultiplexer' exists in both 'StackExchange.Redis.StrongName, Version=1.2.4.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46' and 'StackExchange.Redis, Version=1.2.6.0, Culture=neutral, PublicKeyToken=null' Why is this showing even thou I'm not referencing StackExchange.Redis.StrongName and it's not even the same assembly version? Alvin Lim I found my solution here . By adding this (below) to my csproj: <Target Name="ChangeAliasesOfStrongNameAssemblies" BeforeTargets=

How to define connection string for session state in Azure

醉酒当歌 提交于 2019-11-29 10:59:49
I am using the RedisSessionStateProvider using a procedimient like this https://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-session-state-caching/ I define its connection string in web.config , in this example is XXXXXX . <system.web> <compilation debug="true" targetFramework="4.6.1" /> <httpRuntime targetFramework="4.5" /> <globalization culture="es-CO" uiCulture="es" /> <customErrors mode="Off" /> <sessionState mode="Custom" customProvider="SessionStateStore"> <providers> <add name="SessionStateStore" type="Microsoft.Web.Redis.RedisSessionStateProvider" connectionString

How does StackExchange.Redis use multiple endpoints and connections?

旧巷老猫 提交于 2019-11-29 09:13:51
As explained in the StackExchange.Redis Basics documentation , you can connect to multiple Redis servers, and StackExchange.Redis will automatically determine the master/slave setup. Quoting the relevant part: A more complicated scenario might involve a master/slave setup; for this usage, simply specify all the desired nodes that make up that logical redis tier (it will automatically identify the master): ConnectionMultiplexer redis = ConnectionMultiplexer.Connect("server1:6379,server2:6379"); I performed a test in which I triggered a failover, such that the master would go down for a bit,

Timeout exception after async commands and Task.WhenAny awaits in StackExchange.Redis

梦想的初衷 提交于 2019-11-29 02:02:27
I'm experiencing the so-called Timeout performing HGET company:product:settings, inst: 1, queue: 8, qu=0, qs=8, qc=0, wr=0/0, in=79/1 timeout exception. It's strange because the same Redis instance and in the same machine is storing data, but it's a specific application which throws this exception. Update: In fact, the same application, one line above receives data from Redis. The issue is with HGET . Also, I've increased timeouts on multiplexer configuration to 6 seconds with no luck. In addition, I've checked that IDatabase instance has IsConnected with true value. How to interpret these

How does ConnectionMultiplexer deal with disconnects?

主宰稳场 提交于 2019-11-29 01:28:26
The Basic Usage documentation for StackExchange.Redis explains that the ConnectionMultiplexer is long-lived and is expected to be reused. But what about when the connection to the server is broken? Does ConnectionMultiplexer automatically reconnect, or is it necessary to write code as in this answer (quoting that answer): if (RedisConnection == null || !RedisConnection.IsConnected) { RedisConnection = ConnectionMultiplexer.Connect(...); } RedisCacheDb = RedisConnection.GetDatabase(); Is the above code something good to handle recovery from disconnects, or would it actually result in multiple

Redis keyspace notifications with StackExchange.Redis

我是研究僧i 提交于 2019-11-28 20:35:56
问题 I've looking around and I'm unable to find how to perform a subscription to keyspace notifications on Redis using StackExchange.Redis library. Checking available tests I've found pubsub using channels, but this is more to work like a service bus/queueing rather than subscribing to specific Redis key events. Is it possible to take advantage of this Redis feature using StackExchange.Redis? 回答1: The regular subscriber API should work fine - there is no assumption on use-cases, and this should

Redis Out of Memory Exceptions, but still have plenty of memory

馋奶兔 提交于 2019-11-28 12:13:10
问题 I'm using the StackeExchange.Redis project to interact with Redis in our .NET Core C# project. Under heavy load, our Redis connections will begin to fail with the following exception: StackExchange.Redis.RedisServerException: OOM command not allowed when used memory > 'maxmemory' The problem is that we have a ridiculous amount of free memory left. We're using Elasticache, so it's easy to lookup: We can also connect to Elasticache through a shell, and see that there is memory avaialable, and