fix:线程阻塞问题处理
This commit is contained in:
@@ -51,40 +51,22 @@ spring:
|
||||
monitorInterval: 8
|
||||
tomcatTp: # tomcat webserver 线程池配置
|
||||
threadPoolAliasName: tomcat 线程池 # 线程池别名,可选
|
||||
corePoolSize: 30
|
||||
corePoolSize: 10
|
||||
maximumPoolSize: 50
|
||||
keepAliveTime: 60
|
||||
runTimeout: 10000
|
||||
queueTimeout: 100
|
||||
executors: # 动态线程池配置,都有默认值,采用默认值的可以不配置该项,减少配置量
|
||||
- threadPoolName: cool_pool # 线程池名称,必填dtpExecutor1
|
||||
- threadPoolName: dtpExecutor1 # 线程池名称,必填
|
||||
threadPoolAliasName: core_thread # 线程池别名,可选
|
||||
executorType: common # 线程池类型 common、eager、ordered、scheduled、priority,默认 common
|
||||
corePoolSize: 30 # 核心线程数,默认1
|
||||
maximumPoolSize: 50 # 最大线程数,默认cpu核数
|
||||
corePoolSize: 10 # 核心线程数,默认1
|
||||
maximumPoolSize: 30 # 最大线程数,默认cpu核数
|
||||
queueCapacity: 1024 # 队列容量,默认1024
|
||||
queueType: VariableLinkedBlockingQueue # 任务队列,查看源码QueueTypeEnum枚举类,默认VariableLinkedBlockingQueue
|
||||
rejectedHandlerType: CallerRunsPolicy # 拒绝策略,查看RejectedTypeEnum枚举类,默认AbortPolicy
|
||||
keepAliveTime: 30 # 空闲线程等待超时时间,默认60
|
||||
threadNamePrefix: core_thread # 线程名前缀,默认dtp
|
||||
tryInterrupt: true
|
||||
allowCoreThreadTimeOut: true # 是否允许核心线程池超时,默认false
|
||||
waitForTasksToCompleteOnShutdown: true # 参考spring线程池设计,优雅关闭线程池,默认true
|
||||
awaitTerminationSeconds: 5 # 优雅关闭线程池时,阻塞等待线程池中任务执行时间,默认3,单位(s)
|
||||
preStartAllCoreThreads: false # 是否预热所有核心线程,默认false
|
||||
runTimeout: 2000 # 任务执行超时阈值,单位(ms),默认0(不统计)
|
||||
queueTimeout: 1000 # 任务在队列等待超时阈值,单位(ms),默认0(不统计)
|
||||
- threadPoolName: scheduled_pool # 线程池名称,必填
|
||||
threadPoolAliasName: scheduled_thread # 线程池别名,可选
|
||||
executorType: scheduled # 线程池类型 common、eager、ordered、scheduled、priority,默认 common
|
||||
corePoolSize: 30 # 核心线程数,默认1
|
||||
maximumPoolSize: 50 # 最大线程数,默认cpu核数
|
||||
queueCapacity: 1024 # 队列容量,默认1024
|
||||
queueType: VariableLinkedBlockingQueue # 任务队列,查看源码QueueTypeEnum枚举类,默认VariableLinkedBlockingQueue
|
||||
rejectedHandlerType: CallerRunsPolicy # 拒绝策略,查看RejectedTypeEnum枚举类,默认AbortPolicy
|
||||
keepAliveTime: 30 # 空闲线程等待超时时间,默认60
|
||||
threadNamePrefix: scheduled_thread # 线程名前缀,默认dtp
|
||||
tryInterrupt: true
|
||||
allowCoreThreadTimeOut: true # 是否允许核心线程池超时,默认false
|
||||
waitForTasksToCompleteOnShutdown: true # 参考spring线程池设计,优雅关闭线程池,默认true
|
||||
awaitTerminationSeconds: 5 # 优雅关闭线程池时,阻塞等待线程池中任务执行时间,默认3,单位(s)
|
||||
|
||||
Reference in New Issue
Block a user