hystrix: threadpool: default: coreSize: 500 command: default: execution: timeout: enabled: false #经测算并发下需要设置为false才会都去重试, 将 hystrix 的超时时间直接禁用掉,这样就没有超时的一说了,因为永远也不会超时了 isolation: thread: timeoutInMilliseconds: 80000 ribbon: ConnectTimeout: 30000 #250 ReadTimeout: 1000 #1000 OkToRetryOnAllOperations: true MaxAutoRetriesNextServer: 10 MaxAutoRetries: 0 okhttp: enabled: true
需要在pom 文件中引入spring-retry:
<dependency> <groupId>org.springframework.retry</groupId> <artifactId>spring-retry</artifactId> </dependency>