spring-boot - java.util.concurrent.RejectedExecutionException:拒绝命令,因为线程池 queueSize 处于拒绝阈值
问题描述
我们突然开始在应用程序服务中收到以下错误,我们最近没有对配置进行任何更改。任何人都可以提供一些有关错误的信息吗?
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.
网关中的配置是:
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
我们将 coreSize、forceClosed、maxQueueSize 和 quoteSizeRejectionThreshold 作为默认值,而不是在这个级别配置。它仍然有问题。我们尝试重新启动网关和 Eureka 实例。
解决方案
推荐阅读
- gremlin - 在 AWS Neptune Gremlin Python 中正确处理顶点删除
- java - Eclipse:无法连接到数据库。错误:java.lang.ClassNotFoundException:com.mysql.cj.jdbc.Driver
- visual-studio - 视觉工作室中未显示 Ironpython 错误
- vba - 解锁多个工作簿,每个工作簿都有自己的密码 (VBA)
- android - 在 Android 中启用展开布局时如何默认显示自定义通知和折叠布局
- python - 假设策略:对于每个“桶”,从桶中抽取一个值
- android - 如何在GridLayout中将项目设置为一列并且列水平拉伸?
- macos - HyperLedger Fabric 安装挂在中间,在 MacOS 中没有进展?
- swift4 - 为什么 Rswift 不使用 Carthage 开发 Xcode10?
- android - RxJava Observables 的 LeakCanary 检测