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

The thread too much #8964

Closed
gaoguofan opened this issue Aug 13, 2022 · 7 comments
Closed

The thread too much #8964

gaoguofan opened this issue Aug 13, 2022 · 7 comments
Labels
status/invalid This doesn't seem right

Comments

@gaoguofan
Copy link

Describe the bug
When using dubbo to integrate with nacos, there are a lot of different types of threads found.

Expected behavior
According to common sense, the role of this part of the thread pool is inferred. The first is to publish the heartbeat of the interface, and the other is to obtain interface data through long polling.But the number of these two threads should not be too much, a single thread is enough to traverse the status of all interfaces and the business of heartbeat

Actually behavior
A clear and concise description of what you actually to happen.
The version of the nacos client I am using is 1.2, and the names of these two threads are “com.alibaba.nacos.client.naming.updater” and com.alibaba.nacos.naming.beat.sender

@WilliamsSj
Copy link

We confirm that the bug exists and we plan to fix it in the advanced 3.0 release.

@KomachiSion
Copy link
Collaborator

you can update to 2.0 version, in 2.0 version the heartbeat is connection level, not interface level.

@KomachiSion
Copy link
Collaborator

and you can see whether you use dubbo 2.7.8, which has bugs to create quick many threads.

@ijustyce
Copy link

can you give me some link about this question please.

@gaoguofan
Copy link
Author

No link yet, but I can give you a description of the scenario I use.
I used a self-developed gateway and needed to consume multiple dubbo interfaces. At this time, there will be many threads related to nacos, such as idle, sender threads, etc.
I found through source code analysis that when each dubbo interface generates an agent, a thread pool of 8 threads will be created. Note that every dubbo interface will do this, but I found through source code analysis that the relevant parameters are configured in registryConfig , the number of threads in the generated thread pool can be stabilized at 1, and the configuration parameters are as follows:
image

@gaoguofan
Copy link
Author

can you give me some link about this question please.

see above

@KomachiSion
Copy link
Collaborator

apache/dubbo#6988

@KomachiSion KomachiSion closed this as not planned Won't fix, can't repro, duplicate, stale Aug 26, 2022
@KomachiSion KomachiSion added status/invalid This doesn't seem right and removed status/need feedback labels Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

4 participants