problem description
feign infinite retry, the circuit breaker is triggered repeatedly, the
circuit breaker method will still enter, and the exception can also be caught, but for some reason, feign is my infinite request.
the environmental background of the problems and what methods you have tried
spring cloud environment, this problem occurs when you request an interface with feign. I tried to adjust the dependency, and then it was useless to change the configuration. As long as feign opens
feign:
hystrix:
enabled: true
will repeat the request all the time.
related codes
/ / Please paste the code text below (do not replace the code with a picture)
feign related configuration code
feign.hystrix.enabled=true
feign.okhttp.enabled=true
feign.httpclient.enabled=false
ribbon:
eager-load:
enabled: true
clients: justgo-rbac-provider,justgo-oauth2
-the timeout of sharp ribbon request connection defaults to 2 seconds ms
ConnectTimeout: 5000
-the timeout for sharp request processing defaults to 5 seconds ms
ReadTimeout: 5000
-sharp retries all operation requests. If this MaxAutoRetries is not configured, default false
OkToRetryOnAllOperations: false
-the number of retries for the current instance defaults to 0
MaxAutoRetries: 0
-the number of retries for sharp switching instances defaults to 1
MaxAutoRetriesNextServer: 1
-sharp"s custom ribbon load balancing policy defaults to com.netflix.loadbalancer.AvailabilityFilteringRule
NFLoadBalancerRuleClassName: com.justgo.common.ribbon.XlabelWeightMetadataRule
-sharpNFLoadBalancerRuleClassName: cn.taroco.common.ribbon.XlabelWeightMetadataRule
-the time for sharp to refresh servelist from the registry defaults ms
ServerListRefreshInterval: 15000
hystrix:
command:
default:
execution:
isolation:
strategy: SEMAPHORE
thread:
timeoutInMilliseconds: 60000
shareSecurityContext: true
what result do you expect? What is the error message actually seen?
error message is