csredis icon indicating copy to clipboard operation
csredis copied to clipboard

.NET Core or .NET Framework 4.0+ client for Redis and Redis Sentinel (2.8) and Cluster. Includes both synchronous and asynchronous clients.

Results 157 csredis issues
Sort by recently updated
recently updated
newest added

在Quartz分布式集群中,希望通过使用Lock解决并发问题,但是所有机器上的任务还是会执行,请问是什么问题呢? ``` public async Task Execute(IJobExecutionContext context) { using (var Lock = RedisHelper.Lock(redisKey, 10)) { //业务代码 } } ``` 有没有Lock完整的示例代码?

配置文件设置了连接超时,实际执行时感觉没有按照超时时间抛异常。请问下是什么问题? "ConnString": "10.252.251.126:6379,defaultDatabase=0,password=L3-vtwL*LLd?,UEX7M_3P7$chV$PK?qg0iMuQhmk#Aj#fYLmwG,connectTimeout=2000"。 查看源码发现都没到判断超时时间的方法。 ![image](https://user-images.githubusercontent.com/19202138/178693948-506d4603-d6df-4a44-8bd4-9923e4d00637.png)

问题:大量线程阻塞到这里有哪些原因呢? 环境:windows server 2016 .netcore 3.14 64位程序 现象:寄宿程序的webapi卡死,cpu10%以下,内存暴涨到2个G ,线程数量3W+ 死锁信息: ![image](https://user-images.githubusercontent.com/40555417/146748715-07b9e403-6b33-46ee-a39a-d468a1cee6b0.png) 大量线程阻塞于Write(Stream stream)等待24和22线程。 ![image](https://user-images.githubusercontent.com/40555417/146748656-0831f790-70fc-4630-beda-936e8c1e233a.png) 22和24线程堆栈信息: ![image](https://user-images.githubusercontent.com/40555417/146748867-4fc47d9f-1a06-49dd-b100-e2cdff061af6.png) ![image](https://user-images.githubusercontent.com/40555417/146747645-85ce2ec5-82c3-44c3-9ce6-d4482d14dba9.png)

``` CSRedis.RedisClientException: Connection was not opened at CSRedis.CSRedisClient.GetAndExecuteAsync[T](RedisClientPool pool, Func`2 handerAsync, Int32 jump, Int32 errtimes) at CSRedis.CSRedisClient.ExecuteScalarAsync[T](String key, Func`3 handerAsync) ``` 报上述错误的同时也会报如下错误 ``` System.Exception: 【redis:6379/0】状态不可用,等待后台检查程序恢复方可使用。Connect to server timeout ---> CSRedis.Internal.IO.RedisSocketException:...

大神你好, 我基于.net core 3.1 , csrediscore 3.6.6 redis: 阿里云 4.0社区版 1G主从版 我在startup- ConfigureServices 里面初始化一次 redis var redisCfg = Configuration.GetSectionByKey("common_redisAddress_bitSurvey"); var redisConnStr = $"{redisCfg.ConnectionString},defaultDatabase=3,preheat=false,connectTimeout=30000,autoDispose=false,testcluster=false,poolsize=15"; //Console.WriteLine($"\r\n初始化redis:{Newtonsoft.Json.JsonConvert.SerializeObject(redisCfg)},\r\n [字符串]:{redisConnStr.Trim().TrimEnd()} \r\n"); RedisHelper.Initialization(new CSRedisClient(redisConnStr)); 然后有一个自己的类封装了一些业务 public...

如下代码所示,我将一个BitArray存入redis中,成功了;但是在get的时候报错了。 var key = "love"; var bit = new BitArray(10000); RedisHelper.Instance.Set(key, bit); var cacehBit = RedisHelper.Instance.Get(key); 错误信息 Newtonsoft.Json.JsonSerializationException:“Cannot create and populate list type System.Collections.BitArray. Path '', line 1, position 1.”...

环境为linux内网127.0.0.1 ``` foreach (var memModel in list) { try { CsRedisHelper.QueueSet("TemplateMessageData", new TemplateMessageData() { tmType = TemplateMessageType.服务恢复通知_SendServiceOnNotice, p0 = memModel.gzhAppId, p1 = memModel.gzhOpenId, p2 = title, p3 = name, p4...