-
Notifications
You must be signed in to change notification settings - Fork 26.4k
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
dubbo create nacos multiple identical NamingService #6988
Comments
i |
alibaba/nacos#4491 我遇到的应该也是这个问题吧。还一直以为是nacos的问题来着,原来是dubbo的bug。 |
生产环境上万的Nacos线程,一直以为是Nacos的问题。 |
这个pr确实有效。我自己编译了下,将2.7.8版本里的org.apache.dubbo.registry.nacos.NacosRegistryFactory.class替换为编译后的。项目启动后线程就正常了,服务也都可以正常调用。线程数从2000+恢复到了80左右。由于不需要创建那么多线程了,项目冷启动速度从70s缩短到了27s。 |
glad this issue can help u |
最后没被merge发版是吗 |
Fixed with #7005 |
Environment
Steps to reproduce this issue
here is my demo GitHub Demo address
Expected Result
What do you expected from the above steps?
only one NamingService be created with same namespaceId
Actual Result
Too many NamingServices have been created along with lots of daemon threads, include heartBeats, puch receiver, updater, etc.
like this:
My advice
change
NacosRegistryFactory createRegistryCacheKey
methodas follows:
Pull Request
I send a pr, named
[FIX] dubbo create nacos multiple identical NamingService
If I make any mistakes, please correct me, thanks.
this bug seems has been fixed with this following code, expect that it can be contained in 2.7.9 to solve my problem 😁
The text was updated successfully, but these errors were encountered: