使用quartz添加大量短时任务,发现会有任务不执行(集群2台)
来源:13-6 实现按小时统计订单案例
不努力我们就老了
2020-11-12
使用quartz添加 100个1s的定时任务,发现有大量的任务不执行(通过打印id的方式,发现有任务不执行),也不报错。(使用Misfire策略是这个:cronScheduleBuilder.withMisfireHandlingInstructionDoNothing())
这几个关键参数也都设置了,线程数量远远大于任务数量,求救啊!
quartz.properties.org.quartz.scheduler.batchTriggerAcquisitionMaxCount=160
quartz.properties.org.quartz.jobStore.acquireTriggersWithinLock=true
quartz.properties.org.quartz.scheduler.idleWaitTime=1000
quartz.properties.org.quartz.scheduler.batchTriggerAcquisitionFireAheadTimeWindow=300
quartz.properties.org.quartz.jobStore.misfireThreshold=1300
quartz.properties.org.quartz.threadPool.threadCount=400
写回答
1回答
-
凌波微步
2020-11-13
是不是你的每个任务耗时 超过 1s 了
00
相似问题