Closed ufuk23 closed 1 month ago
If you already ensured worker thread count is sufficient, and increased the batch acquisition count, then you're really just hitting the performance limitation of your database (rows must be inserted/updated as triggers fire).
I have a problem with jobs that are fired late.
E.g: 10 jobs are scheduled at the same time but they are fired 2-3 seconds late I do not know what is happening and what causes this problem. The more scheduled jobs the more gap. If I increase the load the time gap increases. If the job count is a few it works on time.
E.g: 200 jobs should be fired in 30 seconds, but the last job was fired ~4 minutes late. Here is the log snipped: 2024-04-18 17:29:34.469 INFO [nager_Worker-39] c.xxx.scheduler.job.EventJob : [] : The job is fired, name : 23 - 2024-04-18 17:25:32 - c79d9727-ace0-4a29-a18d-e1c02dfe5b2d
I searched for quartz configs and changed the configs below marked bold such as org.quartz.threadPool.threadCount, org.quartz.scheduler.batchTriggerAcquisitionMaxCount but could not succeed.
How could I make the jobs are fired on time?
here is my quartz.properties
============================================================================
Configure Main Scheduler Properties
============================================================================
org.quartz.scheduler.instanceName=scheduler-manager org.quartz.scheduler.instanceId=AUTO org.quartz.scheduler.batchTriggerAcquisitionMaxCount=100 org.quartz.scheduler.batchTriggerAcquisitionFireAheadTimeWindow=100
============================================================================
Configure ThreadPool
============================================================================
org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool org.quartz.threadPool.threadCount=100 org.quartz.threadPool.threadPriority=5
============================================================================
Configure JobStore
============================================================================
org.quartz.jobStore.misfireThreshold=10000 org.quartz.jobStore.class=org.springframework.scheduling.quartz.LocalDataSourceJobStore org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate org.quartz.jobStore.useProperties=true org.quartz.jobStore.tablePrefix=XXX.QRTZ_ org.quartz.jobStore.acquireTriggersWithinLock=true
============================================================================
Configure Cluster properties
============================================================================
org.quartz.jobStore.isClustered=true org.quartz.jobStore.clusterCheckinInterval=10000