springcloud 配置热更新 有坑记录

阅读更多

软件版本

spring-boot-starter-parent 1.5.6.RELEASE
spring.cloud.version Dalston.RELEASE

  

配置中心文件修改

调用服务配置更新

curl-X POST http://192.168.108.199:6130/refresh

报异常

{
    "timestamp": 1521278382874,
    "status": 500,
    "error": "Internal Server Error",
    "exception": "java.util.concurrent.RejectedExecutionException",
    "message": "Request processing failed; nested exception is java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@778db5a5 rejected from java.util.concurrent.ScheduledThreadPoolExecutor@3318012b[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 23]",
    "path": "/refresh"
}

原因与eureka监控检查线程池大小有关 

解决办法,关闭healthcheck健康检查或设置健康检查线程池大小。 

 

eureka:
  client:
    healthcheck:
      enabled: false 
    heartbeat-executor-thread-pool-size: 5 

 

其它解决方案,待确认

 

你可能感兴趣的:(springcloud 配置热更新 有坑记录)