Quartz 2.2.3在一段时间后停止计划下一个作业

时间:2018-11-09 03:41:38

标签: quartz-scheduler

Quartz 2.2.3在一段时间后从线程转储中停止计划下一个作业,我们可以知道所有处于TIMED_WAITING状态(正在等待可运行)的Worker,但是QuartzSchedulerThread阻止了可用线程:

“我的工作”用于下载文件,大小可能在1MB到1GB之间。有时我会从日志中发现以下错误:

[2018-11-09 00:11:25.591] [ERROR] [downloaderScheduler_Worker-10] SimpleThreadPool Worker thread was interrupt()'ed.
java.lang.InterruptedException: null
        at java.lang.Object.wait(Native Method)

这是一个线程转储:

"downloaderScheduler_QuartzSchedulerThread" #48 prio=5 os_prio=0 tid=0x00007fdd8d2c3000 nid=0x5a in Object.wait() [0x00007fdc1b9f8000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at org.quartz.simpl.SimpleThreadPool.blockForAvailableThreads(SimpleThreadPool.java:452)
    - locked <0x000000008024be18> (a java.lang.Object)
    at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:263)

"downloaderScheduler_Worker-10" #47 prio=5 os_prio=0 tid=0x00007fdd8d2c1800 nid=0x59 in Object.wait() [0x00007fdc1baf9000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
    - locked <0x0000000080219190> (a java.lang.Object)

"downloaderScheduler_Worker-9" #46 prio=5 os_prio=0 tid=0x00007fdd8d2bf800 nid=0x58 in Object.wait() [0x00007fdc1bbfa000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
    - locked <0x0000000080219330> (a java.lang.Object)

"downloaderScheduler_Worker-8" #45 prio=5 os_prio=0 tid=0x00007fdd8d2be000 nid=0x57 in Object.wait() [0x00007fdc1bcfb000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
    - locked <0x00000000802194d0> (a java.lang.Object)

"downloaderScheduler_Worker-7" #44 prio=5 os_prio=0 tid=0x00007fdd8d2bc800 nid=0x56 in Object.wait() [0x00007fdc1bdfc000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
    - locked <0x0000000080219670> (a java.lang.Object)

"downloaderScheduler_Worker-6" #43 prio=5 os_prio=0 tid=0x00007fdd8d2ba800 nid=0x55 in Object.wait() [0x00007fdc13dfc000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
    - locked <0x0000000080244d40> (a java.lang.Object)

"downloaderScheduler_Worker-5" #42 prio=5 os_prio=0 tid=0x00007fdd8d2b9000 nid=0x54 in Object.wait() [0x00007fdc1befd000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
    - locked <0x0000000080219810> (a java.lang.Object)

"downloaderScheduler_Worker-4" #41 prio=5 os_prio=0 tid=0x00007fdd8d2b7000 nid=0x53 in Object.wait() [0x00007fdc1bffe000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
    - locked <0x0000000080244ee0> (a java.lang.Object)

"downloaderScheduler_Worker-3" #40 prio=5 os_prio=0 tid=0x00007fdd8d2b5800 nid=0x52 in Object.wait() [0x00007fdcb8192000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
    - locked <0x00000000802440c8> (a java.lang.Object)

"downloaderScheduler_Worker-2" #39 prio=5 os_prio=0 tid=0x00007fdd8d2b2000 nid=0x51 in Object.wait() [0x00007fdcb8293000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
    - locked <0x0000000080245080> (a java.lang.Object)

"downloaderScheduler_Worker-1" #38 prio=5 os_prio=0 tid=0x00007fdd8d2b0000 nid=0x50 in Object.wait() [0x00007fdcb8394000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
    - locked <0x0000000080244268> (a java.lang.Object)

0 个答案:

没有答案