Reputation: 195
We suddenly started receiving following error in out application services, we did not make any change to config in recent time. Could any one provide some information regarding error?
Caused by: com.netflix.hystrix.exception.HystrixRuntimeException: xxx service could not be queued for execution and no fallback available.
Caused by: java.util.concurrent.RejectedExecutionException: Rejected command because thread-pool queueSize is at rejection threshold.
Configuration in gateway are:
hystrix.command.default.execution.isolation.strategy=THREAD
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=360000
hystrix.threadpool.default.coreSize=40
hystrix.command.default.circuitBreaker.forceClosed=true
hystrix.threadpool.default.maxQueueSize=2000
hystrix.threadpool.default.queueSizeRejectionThreshold=1800
zuul.routes.<instance>.path=/<instance>/**
zuul.routes.<instance>.serviceId=<instance>
zuul.routes.<instance>.sensitiveHeaders=
<instance>.ribbon.OkToRetryOnAllOperations=true
<instance>.ribbon.MaxAutoRetriesNextServer=1
<instance>.ribbon.MaxAutoRetries=0
hystrix.command.<instance>.execution.isolation.strategy=THREAD
hystrix.command.<instance>.execution.isolation.thread.timeoutInMilliseconds=360000
hystrix.threadpool.<instance>.coreSize=40
hystrix.command.<instance>.circuitBreaker.forceClosed=true
hystrix.threadpool.<instance>.maximumSize=100
hystrix.threadpool.<instance>.queueSizeRejectionThreshold=80
We were having the coreSize, forceClosed, maxQueueSize and quoteSizeRejectionThreshold as default and not it is configured this level. It still has the issue. We tried restart Gateway and Eureka instance.
Upvotes: 5
Views: 6721
Reputation: 3
By default each command will create its own 'named' thread pool and every time an instance of that command is executed, a thread from that thread pool will be chosen and used. Try with below configuration.
hystrix.command.<instance>.coreSize=40
hystrix.command.<instance>.circuitBreaker.forceClosed=true
hystrix.command.<instance>.maximumSize=100
hystrix.command.<instance>.queueSizeRejectionThreshold=80
Upvotes: 0