alibaba / spring-cloud-alibaba

Spring Cloud Alibaba provides a one-stop solution for application development for the distributed solutions of Alibaba middleware.
https://sca.aliyun.com
Apache License 2.0
27.95k stars 8.34k forks source link

After the console changes configuration files, NacosConfigService is created each time without being destroyed #912

Closed YoungL-SC closed 5 years ago

YoungL-SC commented 5 years ago

Nacos version:1.1.3 client version:1.0.0

dependency: 'org.springframework.cloud:spring-cloud-alibaba-nacos-config:0.9.0.RELEASE'

description as below:

NacosConfigService will be rebuilt every time the configuration file is changed in the console. After hundreds of configuration changes, the CPU will burst due to too many ClientWorker threads created.The NacosConfigService classe is not manually created。

image

Maybe problem is in the class org.springframework.cloud.alibaba.nacos.NacosConfigProperties,because springcloud will refresh class with annotation @ConfigurationProperties,this class will be rebuilt after every refresh phase.

image

image

fangjian0423 commented 5 years ago

related #859

fangjian0423 commented 5 years ago

resolved by https://github.com/alibaba/spring-cloud-alibaba/pull/909.