-
Notifications
You must be signed in to change notification settings - Fork 26.5k
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-4556] fix dubbo startup is slow #4603
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4603 +/- ##
============================================
- Coverage 64.17% 63.91% -0.27%
+ Complexity 453 449 -4
============================================
Files 768 769 +1
Lines 32869 33160 +291
Branches 5179 5226 +47
============================================
+ Hits 21094 21193 +99
- Misses 9358 9545 +187
- Partials 2417 2422 +5
Continue to review full report at Codecov.
|
The pr alarm user that getting ip is too slow by log ? |
Yes, I've seen a Dubbo service take two hours to start. See here for more information: Of course, we can also add a timeout period, and once the timeout occurs, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot agree with this solution, since it does nothing useful but keep printing out the warning message every 10 secs.
Instead of doing this, why don't we simply put more logging messages for this method?
logger.info(hostToBind + " is not valid local host, try to find valid host from DNS.");
hostToBind = InetAddress.getLocalHost().getHostAddress();
I think the root cause of this problem is that once the response is slow due to For logs printed every 10s, we can add some help to find the problem; for example: check DNS server or configure Although the reason for executing |
I agree with the idea suggested by @beiwei30.
|
Thank you for your advice. Now think about adding a thread for a small probability event, it is too heavy. I have revised it again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I can merge it once CI passes. |
What is the purpose of the change
fix #4556
Brief changelog
modify:dubbo/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java