stackexchange.redis

Can't reconnect to Azure Redis via StackExchange.Redis

守給你的承諾、 提交于 2019-12-23 12:23:12
问题 Caveat : Okay so this is a weird one, and i'm not sure if SO is the right place. I have an Azure Website connecting to an Azure Redis Cache instance. (using StackExchange.Redis) Everything was great, then one day - the website couln't connect to Redis. Error: It was not possible to connect to the redis server(s); to create a disconnected multiplexer, disable AbortOnConnectFail. SocketFailure on PING Here's my connection string: mycache.redis.cache.windows.net,ssl=true,password=xxxxxx

Azure Redis cache - timeouts on GET calls

女生的网名这么多〃 提交于 2019-12-21 18:12:13
问题 We've got several web and worker roles in Azure connecting to our Azure Redis cache via the StackExchange.Redis library, and we're receiving regular timeouts that are making our end-to-end solution grind to a halt. An example of one of them is below: System.TimeoutException: Timeout performing GET stream:459, inst: 4, mgr: Inactive, queue: 12, qu=0, qs=12, qc=0, wr=0/0, in=65536/0 at StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl[T](Message message, ResultProcessor 1 processor,

Bursts of RedisTimeoutException using StackExchange.Redis

流过昼夜 提交于 2019-12-21 14:58:55
问题 I'm trying to track down intermittent "bursts" of timeouts using the StackExchange Redis library. Here's a bit about our setup: Our API is written in C# and runs on Windows 2008 and IIS. We have 4 API servers in production, and we have 4 Redis machines (Running Linux latest LTS), each with 2 instances of Redis (one master on port 7000, one slave on port 7001). I've looked at pretty much every aspect of the Redis servers and they look fantastic. No errors in the logs, CPU and network is great,

Stackexchange.Redis timeouts & socketfailures

≡放荡痞女 提交于 2019-12-21 06:09:01
问题 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

RedisSessionStateProvider ERR unknown command 'EVAL'

我们两清 提交于 2019-12-21 04:29:20
问题 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> 回答1: I was running a version

Cant call a function multiple times in Redis Lua script

情到浓时终转凉″ 提交于 2019-12-19 11:20:09
问题 I have a function inside Redis Lua script. If I call the function once everything runs smooth. But if I call the function multiple times I get an error "ERR Protocol error: expected '$', got ' '" var doesExist6 = db.ScriptEvaluate(@" local userName = KEYS[1] local function mysplit(inputstr, sep) if sep == nil then sep = '%s' end local t={} local i=1 for str in string.gmatch(inputstr, '([^'..sep..']+)') do t[i] = str i = i + 1 end return t end local abc = {} abc = mysplit(userName, ':') for k

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

五迷三道 提交于 2019-12-18 12:40:12
问题 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

Redis distributed increment with locking

假如想象 提交于 2019-12-18 11:56:38
问题 I have a requirement for generating an counter which will be send to some api calls. My application is running on multiple node so some how I wanted to generate unique counter. I have tried following code public static long GetTransactionCountForUser(int telcoId) { long valreturn = 0; string key = "TelcoId:" + telcoId + ":Sequence"; if (Muxer != null && Muxer.IsConnected && (Muxer.GetDatabase()) != null) { IDatabase db = Muxer.GetDatabase(); var val = db.StringGet(key); int maxVal = 999; if

Redis failover with StackExchange / Sentinel from C#

夙愿已清 提交于 2019-12-18 10:44:55
问题 We're currently using Redis 2.8.4 and StackExchange.Redis (and loving it) but don't have any sort of protection against hardware failures etc at the moment. I'm trying to get the solution working whereby we have master/slaves and sentinel monitoring but can't quite get there and I'm unable to find any real pointers after searching. So currently we have got this far: We have 3 redis servers and sentinel on each node (setup by the Linux guys): devredis01:6383 (master) devredis02:6383 (slave)

Azure Redis unable to connect to Redis servers

让人想犯罪 __ 提交于 2019-12-12 14:09:49
问题 I'm using StackExchange.Redis.StrongName 1.0.394 And I'm trying to connect to my Azure Redis, but I keep getting this error when I run my project: RedisConnectionException: It was not possible to connect to the redis server(s); to create a disconnected multiplexer, disable AbortOnConnectFail. SocketFailure on PING Oddly enough, if I use StackExchange.Redis 1.0.394 everything works fine, but I need StrongName version in order to use RedisSessionStateProvider. Here is code for connecting to