| Author |
Message |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 06/26/2012 12:50:08
|
nilishah
journeyman
Joined: 06/01/2011 13:47:43
Messages: 31
Offline
|
Hi,
In my application, I have created quartz thread pool size to 10. We have about 300 jobs that are scheduled at the same time, but since thread pool size is 10, Quartz picks up 1st 10 jobs.
I would like to know why it takes another 10 sec to pick up 11th job by quartz? My understanding was, as soon as one thread is done with the job, it should pick up the next job.
Is there some setting that I am missing?
It will be nice if someone can answer this ASAP.
Thanks,
Nili
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 06/26/2012 20:10:36
|
light5
ophanim
Joined: 01/14/2011 20:32:56
Messages: 517
Offline
|
Default jobs in quartz doesn't work like a queue as you expected. In your case, quartz will try to run those jobs as quick as it can, but since threads are limited, then rest of the jobs will consider "misfired" when it pass a certain threshold. (60000 default). When that happen, your trigger will be fire only by misfire thread, not the main scheduler polling thread.
Show your quartz.properties and what your trigger's misfire policy value might shed more lights.
|
Zemian Deng
---------------
Looking for a web UI to manage Quartz?
Try http://code.google.com/p/myschedule |
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 06/26/2012 22:21:02
|
nilishah
journeyman
Joined: 06/01/2011 13:47:43
Messages: 31
Offline
|
Here is my quartz.properties
SCHEDULER_THREAD_POOL_SIZE=10
SCHEDULER_MISFIRE_THRESHOLD=6000
SCHEDULER_DATA_SOURCE=myDS
SCHEDULER_TABLE_PREFIX=QRTZ_
DRIVER_DELEGATE_CLASS=org.quartz.impl.jdbcjobstore.MSSQLDelegate
Can you help me out how can these triggers will be fired by main scheduler rather than misfire thread.
Thanks,
Nili
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 06/27/2012 08:07:46
|
light5
ophanim
Joined: 01/14/2011 20:32:56
Messages: 517
Offline
|
nilishah,
As I said, currently Quartz doesn't come with executing your jobs in a queue fashion. To do what you want, you can try these solutions:
1) Deploy more Quartz schedulers in cluster mode so that it can handle 300 concurrent jobs (you said they fired at the same time, so deploy enough resources to run your jobs as intended). This avoid your job go into misfire mode.
2) You can try using the JobChain listener method to chain all your jobs together that mimic the queue bahavior.
3) Shrink your misfire threshold. Becareful that you might starve other jobs in main scheduler thread.
Note also that each trigger has a MISFIRE_POLICY that you can control what to do after it dected it has misfired.
|
Zemian Deng
---------------
Looking for a web UI to manage Quartz?
Try http://code.google.com/p/myschedule |
|
|
 |
|
|