Comments (4)
CSRedis.ConnectionPool.GetConnection 连接池获取超时(10秒)
from csredis.
poolsize设置多少,最好写一个接口,监控pool状态
[HttpGet(@"connection/redis")]
public object GetConnectionRedis() {
var ret = new Hashtable();
foreach(var pool in RedisHelper.ClusterNodes) {
List<Hashtable> list = new List<Hashtable>();
foreach (var conn in pool.Value.AllConnections) {
list.Add(new Hashtable() {
{ "最后活动", conn.LastActive },
{ "获取次数", conn.UseSum }
});
}
ret.Add(pool.Key, new {
FreeConnections = pool.Value.FreeConnections.Count,
AllConnections = pool.Value.AllConnections.Count,
GetConnectionQueue = pool.Value.GetConnectionQueue.Count,
GetConnectionAsyncQueue = pool.Value.GetConnectionAsyncQueue.Count,
List = list
});
}
return ret;
}
from csredis.
RedisHelper.ClusterNodes 这个是否为所有的节点
我这边用了5个redis库,
public static CSRedis.CSRedisClient RedisClusterX { get; set; }
public static CSRedis.CSRedisClient RedisSentinelX { get; set; }
public static CSRedis.CSRedisClient RedisCacheX { get; set; }
public static CSRedis.CSRedisClient RedisQueueX { get; set; }
public static CSRedis.CSRedisClient RedisBalanceX { get; set; }
这个方法是否能监控到这5个redis的所有链接情况
from csredis.
不是,RedisHelper有自己的CSRedisClient实例。你的这五个实例,各种有独立的连接池,循环上面我发的链接池监控
[HttpGet(@"connection/redis")]
public object GetConnectionRedis() {
var redisclients = new [] { 你定义的五个对象 };
var allret = new Hashtable();
foreach (var redis in redisclients) {
var ret = new Hashtable();
foreach(var pool in redis.ClusterNodes) {
List<Hashtable> list = new List<Hashtable>();
foreach (var conn in pool.Value.AllConnections) {
list.Add(new Hashtable() {
{ "最后活动", conn.LastActive },
{ "获取次数", conn.UseSum }
});
}
ret.Add(pool.Key, new {
FreeConnections = pool.Value.FreeConnections.Count,
AllConnections = pool.Value.AllConnections.Count,
GetConnectionQueue = pool.Value.GetConnectionQueue.Count,
GetConnectionAsyncQueue = pool.Value.GetConnectionAsyncQueue.Count,
List = list
});
}
allret.Add(1, ret);
}
return allret;
}
from csredis.
Related Issues (20)
- 最近几天老是0点后一段时间 redis都报 MISCONF Redis is configured to save RDB snapshots HOT 4
- 请问有延迟队列的功能吗? HOT 1
- 3.8.671 vs 3.8.668 HOT 1
- TONG RDS(国产信创) 哨兵有问题 HOT 9
- 请问在哪里查看版本更新日志 HOT 2
- Thread CurrentCulture csredis hash exception with docker container HOT 15
- Linux 下面 Connection timed out.问题有办法解决吗? HOT 1
- 读取redis抛InvalidCastException HOT 1
- cacheshell哈希表不支持设置-1永久有效 HOT 3
- 请问可以监听redis键过期事件吗 HOT 1
- 请问一下有没有方法取消管道操作 HOT 4
- 这块每次 new byte对GC不太友好,还有读取的时候,建议使用 ArrayPool了
- 链接池中数量
- SlowLogGetAsync HOT 4
- csrediscore is missing NuGet package README file
- 关于前缀的问题 HOT 1
- 哨兵 Master 重新选举后出现 Connection was not opened HOT 3
- ReadLine()判断不严谨,导致内存暴增问题 HOT 4
- feat 增加获取锁间隔
- Status unavailable, waiting for recovery. Connect to server timeout HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csredis.