2881099 / csredis

.NET Core or .NET Framework 4.0+ client for Redis and Redis Sentinel (2.8) and Cluster. Includes both synchronous and asynchronous clients.
MIT License
2.01k stars 414 forks source link

高流量下经常连接超时,但redis监控正常 #478

Open ashuai opened 1 year ago

ashuai commented 1 year ago

csreids 错误

csreids 错误【xxx.redis.rds.aliyuncs.com:6379/0】:Connect to server timeout at CSRedis.CSRedisClient.GetAndExecute[T](RedisClientPool pool, Func2 handler, Int32 jump, Int32 errtimes) at CSRedis.CSRedisClient.ExecuteScalar[T](String key, Func3 hander) at CSRedis.CSRedisClient.Get(String key)

connectionstring

xxx.redis.rds.aliyuncs.com:6379,password=xxx,abortConnect=false,testcluster=false,idleTimeout=30000,tryit=1,poolsize=30,preheat=10,syncTimeout=3000,connectTimeout=3000,asyncPipeline

实例规格 0.5c 512m, 16并发

redis实例诊断

image


请问这大概可能是哪方面的问题?

2881099 commented 1 year ago

客户端连接超时,说明请求没打到服务器,服务器又怎么会有日志记录?

kyleli666 commented 1 year ago

@ashuai 试试增加这么个环境变量?

    # Important for redis high concurrency. It's a hex, see https://github.com/dotnet/runtime/issues/11774
    COMPlus_ThreadPool_ForceMinWorkerThreads=500
xiaolei000129 commented 1 year ago

我也出现了,你解决了吗?