I setup a Spring boot application with @EnableDiscoveryClient
and using Consul as the cloud provider. I noticed that this generates high cpu consumption due to ConsulCatalogWatch.catalogServicesWatch
. Looking at the code, I noticed that the annotation
@Scheduled(fixedDelayString = "${spring.cloud.consul.discovery.catalogServicesWatchDelay:10}")
will cause this method to be call at a very high rate. Does anyone have met this and am I missing something ?
As a workaround, set spring.cloud.consul.discovery.catalogServicesWatchDelay=30000
.
Fixed via issue 94 .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.