解决使用RestTemplate 日志中出现timerCache is above the warning threshold of 1000 with size xxx 警告
项目版本:springboot 1.5.2.RELEASE,springcloud Camden.SR5。某处业务中通过 RestTemplate 使用连接字符串url大量调用第三方服务进行数据同步,日志出现以下警告内容:
2021-09-09 12:11:41.973 WARN [resources-Executor-2] o.s.c.n.metrics.servo.ServoMonitorCache : timerCache is above the warning threshold of 1000 with size 1634.
…
2021-09-09 12:11:41.973 WARN [resources-Executor-2] o.s.c.n.metrics.servo.ServoMonitorCache : timerCache is above the warning threshold of 1000 with size 1635.
…
排查问题:
所涉及到的类:
首先找到日志打印的类:
再看下this.config.getCacheWarningThreshold() 在哪里: