stackexchange.redis

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

筅森魡賤 提交于 2019-12-02 18:46:12
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.ConnectionMultiplexer.ExecuteSyncImpl[T](Message message, ResultProcessor``1 processor, ServerEndPoint server) in

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

柔情痞子 提交于 2019-12-02 17:26:40
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(string key, string value) { var ts = TimeSpan.FromMinutes(_settings.CacheTimeout); _cache.StringSet(key,

VS.NET 2017 forces using StackExchange.Redis 1.2.4.0 in ASP.NET 2.0 Core app

自闭症网瘾萝莉.ら 提交于 2019-12-01 20:16:22
I am using Visual Studio 2017. I just created a new ASP.NET Core 2.0 project. I was trying to use NuGet to pull in the latest StackExchange.Redis 1.2.6 (as of 9/3/2017). However, once I do that, Visual Studio complains that there is a conflicted reference in one of my RedisResult variable. It said Error CS0433 The type 'RedisResult' 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' Server C:\git\Splash\Server\BackPlaneConnection\Channel.cs 19 Active

I can't find the command equivalent to keys in Stack Exchange Redis

走远了吗. 提交于 2019-12-01 16:40:30
I just switched to Stack Exchange Redis, and I could'nt find the command keys equivalent. Is it omitted or in some other place rather than getdatabase()? See https://stackexchange.github.io/StackExchange.Redis/KeysScan This command (for reasons discussed in the link) is a server command, not a database command, and is available via GetServer(...).Keys(...) . Also, as per http://redis.io/commands/keys Warning: consider KEYS as a command that should only be used in production environments with extreme care. It may ruin performance when it is executed against large databases. This command is

I can't find the command equivalent to keys in Stack Exchange Redis

人盡茶涼 提交于 2019-12-01 15:59:21
问题 I just switched to Stack Exchange Redis, and I could'nt find the command keys equivalent. Is it omitted or in some other place rather than getdatabase()? 回答1: See https://stackexchange.github.io/StackExchange.Redis/KeysScan This command (for reasons discussed in the link) is a server command, not a database command, and is available via GetServer(...).Keys(...) . 回答2: Also, as per http://redis.io/commands/keys Warning: consider KEYS as a command that should only be used in production

Could not connect to Redis at 10.XX.XX.28:6379: Unknown error - while accessing from Spring Batch or windows machine

佐手、 提交于 2019-12-01 12:49:39
I have followed all the steps from link: https://linuxtechlab.com/how-install-redis-server-linux/ and using below linux version. uname -a Linux ech-10-XX-XX-28 2.6.32-696.13.2.el6.x86_64 #1 SMP Thu Oct 5 17:03:21 PDT 2017 x86_64 x86_64 x86_64 GNU/Linux This is installed somewhere on cloud on virtual machine and from local windows machine I am trying to access the redis getting below error mentioned here: nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool . My Windows machine: C:\Softwares\redis-2.4.5-win32-win64\64bit>redis-cli

Cant call a function multiple times in Redis Lua script

我与影子孤独终老i 提交于 2019-12-01 12:46:55
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 = 1, #abc, 1 do print (abc[k]) end local xyz = {} xyz = mysplit(userName, ':') for k = 1, #xyz, 1 do

Azure Redis Cache - Multiple errors TimeoutException: Timeout performing GET {key}

不问归期 提交于 2019-12-01 11:31:00
问题 We deployed our application to Azure. It is using the Azure Redis Cache and we are experiencing quite a few timeouts. Namely: [TimeoutException: Timeout performing GET textobjectDetails__23290_TextObject, inst: 1, mgr: Inactive, queue: 5, qu=0, qs=5, qc=0, wr=0/0, in=56864/0] [TimeoutException: Timeout performing GET featured_series_CachedSeries, inst: 1, mgr: Inactive, queue: 4, qu=0, qs=4, qc=0, wr=0/0, in=44470/0] [TimeoutException: Timeout performing GET SeriesByFranchiseId_1_CachedSeries

Azure Cache/DataCache style Regions in Redis

落花浮王杯 提交于 2019-12-01 10:33:18
问题 I am in the planning process of moving a C# ASP.Net web application over to Azure (currently hosted on a single dedicated server) and am looking at caching options. Currently, because we only have one instance of the application running at one time, we have an 'in process' memory cache to relieve the SQL DB of some identical requests. The process at the moment is to clear certain parts of the cache when the managers/services make a change to those parts of the database, e.g. we have a users

StackExchange.Redis Deadlocking

徘徊边缘 提交于 2019-12-01 04:10:55
I'm using StackExchange.Redis (SE.R henceforth) in my Nancy application. There is a single global ConnectionMultiplexer that gets automatically passed around by Nancy's TinyIoC via constructor parameters, and any time I try and use GetDatabase and one of the *Async methods (sync methods only start failing after one of the async methods have been attempted) my application deadlocks. Looking at my parallel stacks it appears that I have four threads: The thread that called Result on one of my Tasks that uses SE.R. (Has lots of Nancy stuff on the stack, then a call to my library that utilizes SE.R