0

@EnableDiscoveryClient我使用 Consul 作为云提供商设置了一个 Spring Boot 应用程序。我注意到这会产生高 CPU 消耗,因为ConsulCatalogWatch.catalogServicesWatch. 查看代码,我注意到注释

@Scheduled(fixedDelayString = "${spring.cloud.consul.discovery.catalogServicesWatchDelay:10}")

将导致此方法以非常高的速率被调用。有没有人遇到过这个,我错过了什么?

4

1 回答 1

0

作为一种解决方法,设置spring.cloud.consul.discovery.catalogServicesWatchDelay=30000.

通过问题 94修复。

于 2015-09-25T16:32:52.337 回答