-
Notifications
You must be signed in to change notification settings - Fork 934
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 leakage of goroutines occurs when using generic #2709
Comments
In generic scenario, the best practice is to cache ReferenceConfig instances for reuse because the initialization of ReferenceConfig is relatively heavy. |
@chickenlj 是的,我在初始化完成后会进行缓存,但缓存会有有效时间,失效后会重新初始化。在失效时我会进行invoker的destroy,但这个destroy看结果似乎不会关闭初始化时开启的nacosListener。导致goroutine不停上涨 |
I see, we will take a look at this issue. |
@chickenlj hi, is there any update? I'm happy to provide any additional information that might be helpful. |
@mimose If you are still interested in this problem, please contact with me. My wechat account |
improve it in weekly #2770 |
Environment
Issue description
When using genric for requests, it can be observed that the number of goroutines keeps increasing with initialization.
init like:
the flame like this, it from nacosListener
The text was updated successfully, but these errors were encountered: