Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

集群环境,高压环境下,报MOVED错误 #161

Open
Yuyg77 opened this issue Oct 11, 2023 · 1 comment
Open

集群环境,高压环境下,报MOVED错误 #161

Yuyg77 opened this issue Oct 11, 2023 · 1 comment

Comments

@Yuyg77
Copy link

Yuyg77 commented Oct 11, 2023

freeredis版本:1.1.5
.netcore版本:6.0
问题描述:集群模式,高压环境下,报MOVED错误,其余日常正常使用,不会报错
注册方式:
public static void Initialization(string configString, char? splitKey = ';')
{
var redisConfigStrings = configString.Split(splitKey.Value);
var connectionString = new List();
foreach (var item in redisConfigStrings) connectionString.Add(ConnectionStringBuilder.Parse(item));
var csRedis = new RedisClient(connectionString.ToArray());
_instance = csRedis;
}
配置:
xxx:xxx,password=xxxxx,maxpoolsize=200,connectTimeout=10000,idleTimeout=170000,retry=3,min poolsize=200;
xxx:xxx,password=xxxx,maxpoolsize=200,connectTimeout=10000,idleTimeout=170000,retry=3,min poolsize=200;
xxx:xxx,password=xxxxxx,maxpoolsize=200,connectTimeout=10000,idleTimeout=170000,retry=3,min poolsize=200

image

@2881099
Copy link
Owner

2881099 commented Oct 11, 2023

slot 变动时会这样

moved 其实是重定向,目前处理机制:moved 会重试3次的,但可能仍然出错,因为 moved 到完成需要一点点时间,在这个时间空档里,是有可能3次重试都报 moved 的

解决方法:在集群上设置,让每个节点资源充足一点,尽量减少 slot 重新分配

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants