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

注册中心迁移时实例波动,监听到实例为零。 #340

Open
BottleOfFairy opened this issue Nov 10, 2023 · 1 comment
Open

注册中心迁移时实例波动,监听到实例为零。 #340

BottleOfFairy opened this issue Nov 10, 2023 · 1 comment

Comments

@BottleOfFairy
Copy link

采用Nacos-Sync0.4.9对两个Nacos注册中心进行服务同步,任务数为1000,迁移过程中目标集群服务列表和实例数不断波动不能稳定,同时监听到部分健康服务实例数为0,Nacos通知显示警告。请问该事件是什么原因,如何稳定?
[com.alibaba.nacos.client.naming.updater] INFO c.a.n.extension.impl.NacosSyncToNacosServiceImpl - 监听到服务DEFAULT_GROUP@@xxx信息改变, taskId:a91b454a-a255-42f5-8cbc-07a9692a8bab,实例数:0,发起同步
[com.alibaba.nacos.client.naming.updater] WARN com.alibaba.nacos.common.notify.NotifyCenter - Unable to plug in due to interruption, synchronize sending time, event : com.alibaba.nacos.client.naming.event.InstancesChangeEvent@5d02d7b5

JVM设置如下:
-Xms6g
-Xmx6g
-Xss512k
-XX:MetaspaceSize=256m
-XX:MaxMetaspaceSize=512m
-XX:MaxDirectMemorySize=1536m

@zrlw
Copy link
Contributor

zrlw commented Nov 13, 2023

这个告警出自nacos客户端,应该是DefaultPublisher发布的实例变动事件放不进去队列,通常是因为队列满了,队列长度应该是16384吧,具体要看一下nacos client的代码。
这么多的事件应该都是nacos源集群产生的,nacos-sync只是源集群实例变动情况的订阅者,它只是转发源集群的实例变动事件到目标集群,如果变动事件数量超过nacos客户端默认队列长度,不能及时将变动情况转发给目标集群,目标集群的实例数量和源集群就会出现差异。
当日也可能是nacos-sync系统资源不足,处理慢导致队列出现积压。

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